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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I need to calculate the running total for a tabular data. I need to use direct query mode.
There are Filters(Slicers) for Date and Product in the report. When we filter the data based on Date and Product, the running total should be calculated as per the filtered applied.
| Date | Product | Cost | Running Total |
| 1/1/2019 | A | 10 | 10 |
| 1/1/2019 | B | 20 | 30 |
| 1/1/2019 | C | 25 | 55 |
| 1/2/2019 | A | 45 | 100 |
| 1/2/2019 | C | 65 | 165 |
| 1/3/2019 | B | 15 | 180 |
| 1/3/2019 | A | 20 | 200 |
Need help in achieving data like above.
Solved! Go to Solution.
@Anonymous ,
You may refer to the measure below.
Measure =
CALCULATE (
SUM ( 'Table1'[Cost] ),
FILTER (
SUMMARIZE ( ALLSELECTED ( 'Table1' ), 'Table1'[Date], 'Table1'[Product] ),
ISONORAFTER (
'Table1'[Date], MAX ( 'Table1'[Date] ), DESC,
'Table1'[Product], MAX ( 'Table1'[Product] ), DESC
)
)
)
@Anonymous ,
You may refer to the measure below.
Measure =
CALCULATE (
SUM ( 'Table1'[Cost] ),
FILTER (
SUMMARIZE ( ALLSELECTED ( 'Table1' ), 'Table1'[Date], 'Table1'[Product] ),
ISONORAFTER (
'Table1'[Date], MAX ( 'Table1'[Date] ), DESC,
'Table1'[Product], MAX ( 'Table1'[Product] ), DESC
)
)
)
Hi @v-chuncz-msft ,
Thank you for your help. 🙂
I was able to achieve the required runnning total using the Measure formulae you shared.
Thanks,
Ravin
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 53 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 122 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |