Forum Discussion
Moving daily average with offset
- 5 years ago
sdgiss If you want the average to span 21 days, then it will need to be 27 days ago to 7 days ago (since you are use = on both ends it is inclusive, otherwise you'd need to use 28).
When you say 21 day moving average offset, what are you wanting to acheive? I think the 27 (or 28 without 😃 is what you're looking for?
sdgiss If you want the average to span 21 days, then it will need to be 27 days ago to 7 days ago (since you are use = on both ends it is inclusive, otherwise you'd need to use 28).
When you say 21 day moving average offset, what are you wanting to acheive? I think the 27 (or 28 without 😃 is what you're looking for?
Thank you so much for your reply AllisonKennedy! It turns out I was making this much harder than it had to be! The solution from amitchandak works like a charm. Many thanks again for offering up your assistance!
- AllisonKennedy5 years agoCommunity Champion
sdgiss Glad you got what you're looking for. amitchandak solution should yield the same results as your solution - they are just two different ways to write/express the same calculation (depending on how you want to think about it). In your original one, you were defining the start and end dates. In Amit's he is defining the start date and how long the period should be.
Love kudos if I helped.
- sdgiss5 years agoHelper I
You were a great help AllisonKennedy! You helped confirm that my first formula might be the one to move forward with. The one from amitchandak is more straightforward and convenient but it doesn't work as a measure with time intelligence functions. If I can't find a way to resolve this issue then I will likely elevate your response to the solution.
Thank you, and Happy New Year!
- AllisonKennedy5 years agoCommunity Champion
sdgiss What do you mean when you say 'it doesn't work as a measure with time intelligence functions'. If you can add more detail on what's not working, we can hopefully help you resolve the issue. 🙂 Happy New Year to you too!