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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Calculate cumulative running total per day.

Hi, I have application counts grouped by each hour. I would like to have a running total of the applications each day. In other words I want to sum the applications and have it reset for the next day.

 

aaronzheng_0-1630433601295.png

 

The runningtotal is adding up but I need it to reset on each new day.

 

This is the dax expression for the runningtotal column :

 

RunningTotal =
CALCULATE(
    SUM('FLA'[ApplicationCount]),
    FILTER(
        ALL(FLA),
FLA[ApplicationHourEST] <= EARLIER(FLA[ApplicationHourEST]
    )
))
 
Thanks in advance.
2 ACCEPTED SOLUTIONS

Hi @Anonymous 

Maybe you can add a calculated column FLA[Date] which is equal to ApplicationHourEST but is only a date and note a datetime.
And then I think the following measure will answer your need :

RunningTotal =
CALCULATE(
    SUM('FLA'[ApplicationCount]),
    FILTER(
        ALL(FLA),
FLA[ApplicationHourEST] <= EARLIER(FLA[ApplicationHourEST]
    )
), VALUES(FLA[Date])= FLA[Date])

View solution in original post

PaulDBrown
Community Champion
Community Champion

try the following code:

 

RunningTotal =
VAR _Date =
    DATE ( YEAR ( FLA[ApplicationHourEST] ), MONTH ( FLA[ApplicationHourEST] ), DAY ( FLA[ApplicationHourEST] ) )
RETURN
    CALCULATE (
        SUM ( 'FLA'[ApplicationCount] ),
        FILTER (
            ALL ( FLA ),
            FLA[ApplicationHourEST] <= EARLIER ( FLA[ApplicationHourEST] )
                && FLA[ApplicationHourEST] = _Date
        )
    )

 

 




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

try the following code:

 

RunningTotal =
VAR _Date =
    DATE ( YEAR ( FLA[ApplicationHourEST] ), MONTH ( FLA[ApplicationHourEST] ), DAY ( FLA[ApplicationHourEST] ) )
RETURN
    CALCULATE (
        SUM ( 'FLA'[ApplicationCount] ),
        FILTER (
            ALL ( FLA ),
            FLA[ApplicationHourEST] <= EARLIER ( FLA[ApplicationHourEST] )
                && FLA[ApplicationHourEST] = _Date
        )
    )

 

 




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






AntoineTRICHET
Resolver III
Resolver III

Hi @Anonymous 

Try the following measure :

RunningTotal =
CALCULATE(
    SUM('FLA'[ApplicationCount]),
    FILTER(
        ALL(FLA),
FLA[ApplicationHourEST] <= EARLIER(FLA[ApplicationHourEST]
    )
), VALUES(DATE(YEAR(FLA[ApplicationHourEST]),MONTH(FLA[ApplicationHourEST]),DAY(FLA[ApplicationHourEST]))=DATE(YEAR(FLA[ApplicationHourEST]),MONTH(FLA[ApplicationHourEST]),DAY(FLA[ApplicationHourEST]))

Hoping it will help you
Anonymous
Not applicable

Hi Antoine,

 

I get this error: The VALUES function expects a column reference expression or a table reference expression for argument '1'.

Hi @Anonymous 

Maybe you can add a calculated column FLA[Date] which is equal to ApplicationHourEST but is only a date and note a datetime.
And then I think the following measure will answer your need :

RunningTotal =
CALCULATE(
    SUM('FLA'[ApplicationCount]),
    FILTER(
        ALL(FLA),
FLA[ApplicationHourEST] <= EARLIER(FLA[ApplicationHourEST]
    )
), VALUES(FLA[Date])= FLA[Date])

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.