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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors