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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Moving Average for custom calendar

Hey everyone, 

 

I have  a custom calendar so the moving average calculations I have tried aren't working, namely the DATESINPERIOD function. My Calendar periods are 28 days each and the financial year begins on the 1/04/17 for eg. Is there a way I can use the DATESINPERIOD function and format it to begin at the start of my financial year, or is there any other way around calculating moving average for a custom calendar.

 

Thank you in advance 

 

Regards,

 

Pangea

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 



Is there a way I can use the DATESINPERIOD function and format it to begin at the start of my financial year.

 


I'm afraid this is not available. Such a time intelligence function works based on natural calendar dates, instead of custom calendar.

 



or is there any other way around calculating moving average for a custom calendar.

 


For more advice, please provide sample data to tell us what the data table is, what the custom calendar looks like and how to calculate the moving average. Besides, please show us your desired output with examples. How to Get Your Question Answered Quickly

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 



Is there a way I can use the DATESINPERIOD function and format it to begin at the start of my financial year.

 


I'm afraid this is not available. Such a time intelligence function works based on natural calendar dates, instead of custom calendar.

 



or is there any other way around calculating moving average for a custom calendar.

 


For more advice, please provide sample data to tell us what the data table is, what the custom calendar looks like and how to calculate the moving average. Besides, please show us your desired output with examples. How to Get Your Question Answered Quickly

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I solved it, thanks for your prompt reply though

 

In case anyone else needs a pointer in how to achieve this;

 

Index your months in your calendar table 

 

and then filter using your calendar date table and calendar index column

 

max<= (x) - how many steps, or months, [n-1) logic, so for 3 months = max <= -2 and for 12 months = max<= -11

 

Then create a new measure, which will allow you to divide by the periods you have, so eg, in  12 month Fiscal Year, I have 13 periods, so I use my index measurement and divide it by 13 periods

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.