Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vinnie9935
New Member

Totals based Data in Two Columns

How can I total the shift time based on the occurrence of a name in either the employee or supervisor column:

Source Data:

 EmployeeSupervisorShift Time
6/9/2022JackJill1.5
6/10/2022Jill 1.1

 

My Power BI Report output:

vinnie9935_1-1676392936095.png

 

I need Jill's time to total 2.6 and have no idea how to make that happen.

 

TYIA!

David

 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @vinnie9935 ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Measure = var _1= MAXX(ALL('Table'),'Table'[Supervisor])
var _2=CALCULATE(MAX('Table'[Shift Time]),FILTER(ALL('Table'),'Table'[Supervisor]=_1))
return 
IF(_1=SELECTEDVALUE('Table'[Employee]),MAX('Table'[Shift Time])+_2,MAX('Table'[Shift Time]))

vpollymsft_0-1676424123263.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @vinnie9935 ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Measure = var _1= MAXX(ALL('Table'),'Table'[Supervisor])
var _2=CALCULATE(MAX('Table'[Shift Time]),FILTER(ALL('Table'),'Table'[Supervisor]=_1))
return 
IF(_1=SELECTEDVALUE('Table'[Employee]),MAX('Table'[Shift Time])+_2,MAX('Table'[Shift Time]))

vpollymsft_0-1676424123263.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.