cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
OskariNi Regular Visitor
Regular Visitor

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Distinct sum measure

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
Community Support Team
Community Support Team

Re: Distinct sum measure

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors