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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Running total but after given start year

Dear Power BI community

For some reason I have a hard time creating a measure that calculates the running total by year of another measure after a given start year. Other post on running total have not helped me so far, so I hope you can give me some advice. 

I have a calendar table and a data table. From these I have created a measure called [Change] which calculates the change in products stock (forecast) and therefore i first need a running total from this year and on. So in the table below i have showed the visual i have made based on this and added the measure [Running total of change] which is what i need help for:

What I haveWhat I haveWhat I need
Year ChangeRunning total of change
20222 
20231 
202433
202514
202659
2027211


Thank you in advance 🙂

1 ACCEPTED SOLUTION
xifeng_L
Super User
Super User

Hi @Anonymous 

 

You can try below measure.

 

Running total of change =
VAR StartYear_ = YEAR ( NOW () )
VAR CurRowYear = MAX ( 'Calendar'[Year] )
RETURN
    SUMX (
        FILTER (
            ALL ( 'Calendar'[Year] ),
            'Calendar'[Year] >= StartYear_
                && 'Calendar'[Year] <= CurRowYear
        ),
        [Change]
    )

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

View solution in original post

2 REPLIES 2
xifeng_L
Super User
Super User

Hi @Anonymous 

 

You can try below measure.

 

Running total of change =
VAR StartYear_ = YEAR ( NOW () )
VAR CurRowYear = MAX ( 'Calendar'[Year] )
RETURN
    SUMX (
        FILTER (
            ALL ( 'Calendar'[Year] ),
            'Calendar'[Year] >= StartYear_
                && 'Calendar'[Year] <= CurRowYear
        ),
        [Change]
    )

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

Joe_Barry
Super User
Super User

Hi @Anonymous 

 

Are you using a date table in your data model and it is marked as a date table? If you do, you can use the time intellignece DAX

 

Change Running Total =
TOTALYTD(SUM(Table[Change]), Date[Date])

 Hope this hlps

Joe




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

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


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.