cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bml123
Helper II
Helper II

Sum of distinct values by customer and Status

I have data like shown below. I want the sum of distinct values by id and status.

IdStatusAmount
1A100
1A200
1A100
1B400
1B400
1B300

 

I have a filter in my report with status drop down containing A, B etc. 

When status A is chosen it should show the output as below

IdStatusTotal
1A300

 

when status B is chosen it should show the output as below

1B700

 

1 ACCEPTED SOLUTION

@bml123 

A simple SUM would do:

 

Total = SUM( Table[Amount])

 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
Fowmy
Super User IV
Super User IV

@bml123 

Create the following measure:

Dis. Total = 
SUMX(
    DISTINCT(Table[Amount]),
    Table[Amount]
)

 

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy

Hi, thank you. How can we sum the values by id including all the values, not just distinct values?

@bml123 

 

Not clear, can you show me the expected result based on your sample?

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Sorry for not being clear.

Expected output for status A should be 400

Expected outout for status B should be 1100

 

it just need to add all the amounts irrespective if they are same or not.

@bml123 

A simple SUM would do:

 

Total = SUM( Table[Amount])

 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.