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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors