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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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])

@ 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!:
Mastering Power BI 2nd Edition

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])

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors