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
CarlSagan
Helper II
Helper II

Have a running total continue past year

I'm having trouble with computing a running total that gets pased the filter context on year in a matrix. Is it possible to have the value of January 1992 be the sum of December 1991 plus January 1992? I don't know how to get it past the year filter.

The first column is the normal sum amount that power bi computes, the second column the running total measure I am trying to have continue into the next year.

CarlSagan_0-1688751412221.png

 

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @CarlSagan 

Check link https://www.sqlbi.com/articles/computing-running-totals-in-dax/ 

 

Sales RT :=
VAR MaxDate = MAX ( 'Date'[Date] ) -- Saves the last visible date
RETURN
    CALCULATE (
        [Sales Amount],           -- Computes sales amount
        'Date'[Date] <= MaxDate,  -- Where date is before the last visible date
        ALL ( Date )              -- Removes any other filters from Date
    )
 

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

1 REPLY 1
some_bih
Super User
Super User

Hi @CarlSagan 

Check link https://www.sqlbi.com/articles/computing-running-totals-in-dax/ 

 

Sales RT :=
VAR MaxDate = MAX ( 'Date'[Date] ) -- Saves the last visible date
RETURN
    CALCULATE (
        [Sales Amount],           -- Computes sales amount
        'Date'[Date] <= MaxDate,  -- Where date is before the last visible date
        ALL ( Date )              -- Removes any other filters from Date
    )
 

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






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.