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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

Year to Date Rolling Total

Good Day,

 

I am trying to get a running total by year but am just getting the total of each year. What I am wanting is a running total by year. So for instance 2018 has 1085 as the count and 2019 has 12404 as the count on the matrix I would like 2019 to be a sum of 2018 & 2019 and to continue on for the rest of the years. Can someone help me through this madness? 

Current Formula: 

YTD Assets =
CALCULATE (
  SUM (Assets[Status Bit]),
    FILTER (
        ALL ( 'Assets' ),
        'Assets'[Created_Date] <= MAX ( 'Assets'[Created_Date] )
            && 'Assets'[Year] = MAX ( 'Assets'[Year] )
    )
)

IGotTheP0werBI_3-1667250827729.png

 

 

IGotTheP0werBI_4-1667250838194.pngIGotTheP0werBI_5-1667250856556.png

IGotTheP0werBI_6-1667250868610.png

 

 

 

 

Many Thanks,

Your friendly neighborhood Lydia

 

 




1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous Try Better Running Total: Better Running Total - Microsoft Power BI Community

Better RT = 
    VAR __Date = MAX('Assets'[Created_Date])
    VAR __Table = FILTER(ALLSELECTED('Assets'),[Created_Date] <= __Date)
RETURN
    SUMX(__Table,[Status Bit])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Greg_Deckler Thank youuuuu!!!! It worked!!

Greg_Deckler
Super User
Super User

@Anonymous Try Better Running Total: Better Running Total - Microsoft Power BI Community

Better RT = 
    VAR __Date = MAX('Assets'[Created_Date])
    VAR __Table = FILTER(ALLSELECTED('Assets'),[Created_Date] <= __Date)
RETURN
    SUMX(__Table,[Status Bit])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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