cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper V

## Rolling 12 month calculation - Not all 12 months showing in table

Afternoon all

Can someone please help with the following calculations. I'm trying to work out how to do a rolling 12 month calculation

My starting point will always need to go back 12 month even though the previous 12 months arent showing in the table (if that makes sense), So my starting point above is Nov and for that calculation I would need to sum the previous 12 months figures and then so on for each month showing in the table, and then deivide each rolling period by 12 to get the average rolling figure for that month. So

for Nov 20 - Sum the figures for Dec 19 - Nov 20 and divide that by 12

Dec 20 - Sum the figures for Jan 20 - Dec 20 and divide that by 12

Jan 21 - Sum the figures for Feb 20 - Jan 21 and divide that by 12

And so on

I then only want to see the previous 12 months in the table

I then need to do the same measure but with a different field, but once I have the measure for the abbove I can easily do this. Then finally I would didide one measure by the other to get the below final table %'s

Essentially my final table will look like the below

Is there anyone that can help with the rolling calculation please. I really hope the above makes some sense?

Karen

1 ACCEPTED SOLUTION
Memorable Member

Dates In Period with help you with this.

CALCULATE(Measure),
DATESINPERIOD('Sales Table'[Docket Date], LASTDATE('Sales Table'[Docket Date]), -365, DAY))

Hope this helps.

Did I help you today? Please accept my solution and hit the Kudos button.

Did I help you today? Please accept my solution and hit the Kudos button.
3 REPLIES 3
Memorable Member

Dates In Period with help you with this.

CALCULATE(Measure),
DATESINPERIOD('Sales Table'[Docket Date], LASTDATE('Sales Table'[Docket Date]), -365, DAY))

Hope this helps.

Did I help you today? Please accept my solution and hit the Kudos button.

Did I help you today? Please accept my solution and hit the Kudos button.
Helper V

Hi @davehus

Thanks so much for getting back to me. This is great, think it's done the trick and I can use for my other measure too, which is ace 😊  . Will do a bit more testing and then come back and sign off as solution

Kind regards

Karen

Memorable Member

Thanks @KarenFingerhut , Glad I could be of help. 🙂

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors