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.
So I am trying to get a column that shows the sum of the cumulative totals of item counts from a data set. Here is an example:
TITLE | Cumulative Total |
AAA | 100 |
BBB | 75 |
CCC | 55 |
DDD | 40 |
EEE | 25 |
Total | 295 |
Here is what I want the final result to be
TITLE | Cumulative Total | All Record Totals | Percentage of total |
AAA | 100 | 295 | 33.90% |
BBB | 75 | 295 | 25.42% |
CCC | 55 | 295 | 25.42% |
DDD | 40 | 295 | 13.56% |
EEE | 25 | 295 | 8.47% |
Total | 295 | 100% |
I know I need to do something like All Record Totals = CALCULATE([Cumulative Total],ALLSELECTED(TITLE)), but when I do this, I only get the Cumulative total returned.
What might I be doing wrong? (Can you tell I am trying to do a Pareto?) Thanks!
Solved! Go to Solution.
Hey @guyinazo ,
maybe you can share your PBIX file?
For me the formula looked good and also my example works with your measure:
Thanks, that is exactly what I needed. I had an error in the ALLSELECTED parameter as I was looking at a singular value and not the table as a whole. It is good now. Thanks!
Hi @guyinazo
You can achieve that result by creating a new column with the below DAX formula and make sure to format it to purcentage
Percentage of total =
VAR _t=CALCULATE(SUM('Table'[Cumulative Total]),REMOVEFILTERS('Table'))
Return 'Table'[Cumulative Total]/_t
Did it work ? Mark it as a solution to help spreading knowledge.
A kudos would be appreciated
Hey @guyinazo ,
maybe you can share your PBIX file?
For me the formula looked good and also my example works with your measure:
Thanks, that is exactly what I needed. I had an error in the ALLSELECTED parameter as I was looking at a singular value and not the table as a whole. It is good now. Thanks!
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |