cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper IV

## Calculate sums of 12 months rolling year

Hi

I would like to calculate the sum of consumptions over a 12 month rolling period, but for each month.

Exemple:

We are in December 2022, hence I would like the following:

- Sum of consumption in October 22

- Sum of consumption in September 22

- ....

- Sum of consumption in December 21

I tried to use DATESINPERIOD but doesn't seem to work out

Thanks

Super User

@Medmbchr , with help from date table

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH))

Rolling 12 till last 2= CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],eomonth(MAX('Date'[Date])-2) ,-12,MONTH))

Rolling 12 till last 1= CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],eomonth(MAX('Date'[Date])-1) ,-12,MONTH))

You can use -11 or -10 as per need

Rolling Months Formula: https://youtu.be/GS5O4G81fww

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors