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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, I would like to calculate the running total based on the product sales.
Below is my sample dataset:
I want to calculate the running total in this order: group by product, and get total sales for each product. And calculate running total sales based on that.
I tried to use running total measure in power bi, but it doesn't work.
Does anyone happend to know the solution for this question? Thanks ahead.
Solved! Go to Solution.
pls see the attachment below
Proud to be a Super User!
Hi @gwjjjjj ,
You can try formula like below:
MEASURE =
VAR SUM_BY_Pro =
CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Product] ) )
RETURN
DIVIDE ( SUM_BY_Pro, CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) ) )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
you can try this
Proud to be a Super User!
That's works! One more question if you don't mind. If I have one more column called month. I want to add a month slicer, so user can check running total for different month. I try to use your method to do it, but it doesn't work. Thank you so much for your help.
pls see the attachment below
Proud to be a Super User!