Forum Discussion

Fraze's avatar
Fraze
Helper I
4 years ago

Converting Calculated Measure to Moving Average

Hello,

 

Re-opening this post with the source file from the start: https://1drv.ms/u/s!AuZqEDLABUeQgs4umqr7okhOnjzpDQ?e=WdXSuk

 

Doing some work on calculating Inventory Turnover Days. I am successfully able to calculate the Inventory Turnover Days as seen in the visual monthly and quarterly:

 

 

 

 

 

However, I cannot seem to create a measure that calcualtes the 3 month moving average. How would I convert my current measure, or create a new one that would give me the moving average?

 

Using using DATESINPERIOD from this ARTICLE I attempted to create the moving average is was looking for, but is not working since the end result is the same...

 

Any help and direction would be appreaciated. Thanks!

2 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Fraze 

     

    Can you show the mathematical formula if you calculate the 3 month moving average by hand? Currently since your measure could not give the correct result, I'm not sure what is the logic to calculate the result you want. You can take the latest month in this sample as an example. This would help us understand the logic better. 

     

    Best Regards,
    Community Support Team _ Jing