Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Dynamic 12M Moving Average Recalculation depending on Slicer Selection

Hello everyone,

I have one somewhat 12M Prior Dynamic Moving Average calculation that depending on what the user selects on a slicer (2,6,12 which are months which calculation should re-set, so kind of a step) then the measure re-sets itself.
Example:

If an user selects 2, means every 2 months the Measure should re-calculate itself. How this currently behaves is, for selection 2, then January will make the calculation of the previous 12M and February will share the same value... Then March will make the calculation of the previous 12M and share with April... 
If an user selects 6, then January will calculate and share until June and then July re-calculates and shares until December.. So this reset points are basically hard-coded.

So my measure is somewhat dynamic, but what I would like to achieve would for example:
An user is looking from February on-wards and selects Reset Value to every 2 Months.. and So the Calculation begins in February and extends to March and then April calculates and shares with May... so on and so forth..
In my Current measure, February Value is basically January's value.Hopefully I was not too confusing.

Any tips are appreciated! Thanks!