Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi,
I am trying to include a column for cumulative sum in Power BI table visual.
Obviously the following version is a simplified scenario compared to the complex case I am implementing.
Sample table
| Code | Qty |
| A | 1 |
| A | 1 |
| B | 1 |
| C | 1 |
| A | 1 |
| D | 1 |
| E | 1 |
| B | 1 |
| B | 1 |
| B | 1 |
| B | 1 |
Result table without Cumulative total (order by Qty descending)
| Code | Qty |
| B | 5 |
| A | 3 |
| C | 1 |
| D | 1 |
| E | 1 |
DAX formula the I use at the moment
| Code | Qty | Running Total MEASURE | Expected values |
| B | 5 | 11 | 5 |
| A | 3 | 11 | 8 |
| C | 1 | 11 | 9 |
| D | 1 | 11 | 10 |
| E | 1 | 11 | 11 |
Any help would be greatly appreciated.
Regards,
Solved! Go to Solution.
Hi @Gpensabene
Sorry should have a reference table and not duplicate, please see the attached.
Hi @Gpensabene
Please see the attached file with a solution
Hi @Mariusz
It is not work, you have add an hardcoded table with the current order.
I added new records at 'A'
expected
| Code | Qty | Expected values |
| A | 8 | 8 |
| B | 5 | 13 |
| C | 1 | 14 |
| D | 1 | 15 |
| E | 1 | 16 |
Thanks for the attempt
Hi @Gpensabene
Sorry should have a reference table and not duplicate, please see the attached.
Hi,
these pbix files have a fault on opening.
dmcn_pbix
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 50 | |
| 38 | |
| 31 | |
| 27 |