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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Riggan2023
Frequent Visitor

Running totals measure without blanks

Hi.

I need help with running total measure. I cant figure out how to fill the blanks in my running total calculations.  I dont need blanks. They should be filled by previous value if the appropriate cell is eq. 0

This is how it should look like

Screenshot_1.png

 

I use this measure to calculate Running totals

RunningTotal = CALCULATE(
COUNT('Dataset'[ArchDate]),
FILTER(  ALLSELECTED('Dataset') ,
SUMX( FILTER( 'Dataset', EARLIER( 'Dataset'[ArchDate] ) <= 'Dataset'[ArchDate] ), COUNT('Dataset'[ArchDate] ))
))

 

 

This is my sample pbix

 

https://file.io/mdWjHkb9oHuB 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

That's a pretty odd measure with a SUMX being used as a boolean filter inside FILTER.

 

Try something simpler like this:

RunningTotal =
VAR CurrDate = MAX ( MyCalendar[Date] )
RETURN
    CALCULATE (
        [Totals],
        ALLSELECTED ( MyCalendar ),
        MyCalendar[Date] <= CurrDate
    )

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

That's a pretty odd measure with a SUMX being used as a boolean filter inside FILTER.

 

Try something simpler like this:

RunningTotal =
VAR CurrDate = MAX ( MyCalendar[Date] )
RETURN
    CALCULATE (
        [Totals],
        ALLSELECTED ( MyCalendar ),
        MyCalendar[Date] <= CurrDate
    )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.