Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
CmdrKeene
Helper IV
Helper IV

Help with Running Total

I've reviewed several posts and this seems mostly the same as Solved: Re: DAX Question: Running Totals with Missing Valu... - Microsoft Fabric Community, but I can't seem to understand the formula well enough to adapt it.

 

Basically I have a running total of orders in each hour. It's in a single table (query result) that groups the results per hour and some other dimensions (obfuscated here but we can just say order type).

 

This is the same data as Stacked Bar and as matrix for comparison.  

 

Notice the purple category (type 1) is present in hour 1 but missing from hours 2 and 3?  But then it appears again in 4.

 

I want the running total to repeat the same total if it is unchanged, so that the chart only grows.

 

Basically the way Excel pivot chart would do it.

 

I don't really want to use a calendar table because then I'll need a literal table of every hour and that seems weird.  Can I just modify the formula as Solved: Re: DAX Question: Running Totals with Missing Valu... - Microsoft Fabric Community did, perhaps by using unique order type from the same table?

 

CmdrKeene_0-1690312192149.png

 


CmdrKeene
1 REPLY 1
amitchandak
Super User
Super User

@CmdrKeene , have separate hour column and hour table and have measure like

 

Cumm Hour= CALCULATE(SUM(Sales[Amount]),filter(all('Hour'),'Hour'[Hour] <=max('Hour'[Hour])))

 

Cumm Based on Hour= CALCULATE(SUM(Sales[Amount]), Window(1,ABS,0,REL, ALL('Hour'[Hour]),ORDERBY('Hour'[Hour],ASC)))

 

or you try cumulative with window with partition by

Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.