cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)