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.
I have data like shown below. I want the sum of distinct values by id and status.
Id | Status | Amount |
1 | A | 100 |
1 | A | 200 |
1 | A | 100 |
1 | B | 400 |
1 | B | 400 |
1 | B | 300 |
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
Id | Status | Total |
1 | A | 300 |
when status B is chosen it should show the output as below
1 | B | 700 |
Solved! Go to Solution.
@bml123
A simple SUM would do:
Total = SUM( Table[Amount])
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@bml123
Create the following measure:
Dis. Total =
SUMX(
DISTINCT(Table[Amount]),
Table[Amount]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi, thank you. How can we sum the values by id including all the values, not just distinct values?
Not clear, can you show me the expected result based on your sample?
⭕ 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])
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |