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
OskariNi
Helper I
Helper I

Distinct sum measure

Hello, 

 

I need to create a measure where I sum the shift hours. The problem is that I need to sum the hours of one user_sign only once while keeping the possibility to slice this table based on ac_type column. If I group this table based on user and shift I lose to this possibilty of slicing. 

 

Do you have any ideas how to solve this one?

 

2019-04-02 15_33_00-PCC infoscreen - Power BI Desktop.png

 

BR. Oskari

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @OskariNi ,

 

Firstly, create slicer visual for ac_typ. Then, create measure Sum_shift to sum the hours of user_sign.

 

Sum_shift = CALCULATE(SUM(Table1[shift_time]),ALLSELECTED(Table1[ac_typ]))

 

Choose table visual to display the result.

 

2.png 

 

 

 

 

 

For example, when select 32SA in slicer, return the result showing picture below.

 

3.png 

 

 

 

 

 

 

Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EbBcjDBm1cdOvxJQ2t...

 

Best Regards,

Amy

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @OskariNi ,

 

Firstly, create slicer visual for ac_typ. Then, create measure Sum_shift to sum the hours of user_sign.

 

Sum_shift = CALCULATE(SUM(Table1[shift_time]),ALLSELECTED(Table1[ac_typ]))

 

Choose table visual to display the result.

 

2.png 

 

 

 

 

 

For example, when select 32SA in slicer, return the result showing picture below.

 

3.png 

 

 

 

 

 

 

Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EbBcjDBm1cdOvxJQ2t...

 

Best Regards,

Amy

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.