Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

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

  • 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

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft 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

    • Anonymous's avatar
      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