cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
v-yulgu-msft Super Contributor
Super Contributor

Re: Moving Average for custom calendar

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.
2 REPLIES 2
v-yulgu-msft Super Contributor
Super Contributor

Re: Moving Average for custom calendar

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

Re: Moving Average for custom calendar

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
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 114 members 1,630 guests
Please welcome our newest community members: