cancel
Showing results for
Did you mean:

## running total for multiple months or years

Hello Community,

I am looking for a way to calculcate the running total for a number of years or months. E.g. I want to accumulate the values like:

Running Total 1 Year

Running Total 2 Year

Running Total 3 Year

Running Total 4 Year

And have it all displayed in a table to consists of 20+ years.

1 ACCEPTED SOLUTION
Super User

Hi,

I am not sure if I understood your question correctly without seeing how expected outcomes look like, but please try to write measures like below.

``````Running total one year measure: =
SUMX (
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), -1, YEAR ),
)
``````

``````Running total two years measure: =
SUMX (
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), -2, YEAR ),
)
``````

``````Running total three years measure: =
SUMX (
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), -3, YEAR ),
)
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

2 REPLIES 2

that seemed to be working 🙂 thank you

Super User

Hi,

I am not sure if I understood your question correctly without seeing how expected outcomes look like, but please try to write measures like below.

``````Running total one year measure: =
SUMX (
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), -1, YEAR ),
)
``````

``````Running total two years measure: =
SUMX (
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), -2, YEAR ),
)
``````

``````Running total three years measure: =
SUMX (
DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), -3, YEAR ),
)
``````

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

#### Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors