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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.