Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello community,
I'm trying to build a running total-measure for products, but I can't find a solution. Here is my data:
| Products |
| Apple |
| Apple |
| Apple |
| Pear |
| Pear |
| Orange |
I want to count the products in the table and then build a running total. This should be the result:
| Products | Quantity | Running total |
| Apple | 3 | 3 |
| Pear | 5 | 5 |
| Orange | 1 | 6 |
In MS Excel this is quite easy to realize, but in Power BI I can not find a way.
I already looked around in the forum and I found some good ideas with calcuated columns, RANKX and EARLIER, but I just want to do it with measures.
Does anyone has an idea?
Greeting
Jan
Solved! Go to Solution.
Hi, @Jan_Trummel
Please check this example:
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
Proud to be a Super User!
Thanks ALLUREAN,
that was it! You helped me very much!
Hello ALLUREAN,
first of all I want to thank you for your effort! Unfortunately your solution will not work in my case.
For example, if the number of pears in the Fact-table increases, the sorting is no longer right:
The matrix should always be sorted (descanding) by Quantity and the RunningTotal should start with the product which has the highest number.
As you can see, this don't work any longer now.
Do you have an idea for this problem, too?
Greetings
Jan
Hi, @Jan_Trummel
Can you download the file again. I think that this is what you want to achieve.
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
Proud to be a Super User!
Hi, @Jan_Trummel
Please check this example:
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!