Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |