Forum Discussion
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?
BR. Oskari
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.
For example, when select 32SA in slicer, return the result showing picture below.
Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EbBcjDBm1cdOvxJQ2tPcXFsBBF_m6tVfU8l6VFNo9jwrjw?e=JEqgh7
Best Regards,
Amy
1 Reply
- v-xicaiCommunity 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.
For example, when select 32SA in slicer, return the result showing picture below.
Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EbBcjDBm1cdOvxJQ2tPcXFsBBF_m6tVfU8l6VFNo9jwrjw?e=JEqgh7
Best Regards,
Amy