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
Anonymous
Not applicable

Using a slicer to calculate a total!

I am looking to find out how many hours each employee is working per week.

 

I have a table with the office hours that each employee has worked per day. I also have a lookup table with the fixed number of hours that each employee works from home each week (this does not change each week).

 

I have a slicer with number of weeks. When i select one individual week i can see the correct total (the individuals weeks office hours plus there work from home hours). However if i select more than one week i am able to see the correct office hours HOWEVER still only able to see one weeks worth of working from home hours.

 

FOR EXAMPLE: 

When selecting Week 15 "James" Work from home hours are 7.5 (which is correct)

When selecting Week 16 and 15 "James" Work from home hours are still 7.5 (This is two weeks so should be 7.5 X 2 = 15)15.jpg15 and 16.jpg

 

 

 

 

 

 

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi vickygibbons123,

 

Have you create some calculate columns or measure to sum the working hours based on values you selected? If not, you can create a measure using DAX like this:

Total working hour =
CALCULATE ( SUM ( table[hours] ), ALLSELECTED ( table[weeks] ) )

Regards,

Jimmy Tao

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.