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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
mloc1990
Helper I
Helper I

Running total that restarts after a number of days based off a measure

Hi,

 

Im pretty new to power BI and DAX, I have the running total calculated using the formula below for accounts:

Running Total = CALCULATE(SUM(uwtest[volume]),FILTER(ALL(uwtest),'uwtest'[authdate]<=MAX(uwtest[authdate])),VALUES(Accounts[accountname]))
 
I have a measure of days that varies depending on the account and I'm trying to calculate it where it will restart the running total for accounts when a certain number of days have been reached.
 
E.g an account has 133 days and every 133 days the running total will restart.
 
Thanks for the help!
2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @mloc1990 

The best way is that add a group column for date column (uwtest[authdate] )

Then add a conditional in the measure

Running Total = CALCULATE(SUM(uwtest[volume]),FILTER(ALL(uwtest),'uwtest'[authdate]<=MAX(uwtest[authdate]) && 'uwtest'[group] = MAX('uwtest'[group])),VALUES(Accounts[accountname]))

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-lili6-msft 

 

It's definitely along the lines of what I am needing but when I add the group column I can only select a predefined period that will be the same for all accounts. In the attached images is it possible to do the same setup using a measure I have created called "Medium Days" as each account has a different amount of days for running total.

 

Thanks!

 

 

Running Total Medium Days.PNGGroup Column.PNG

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.