Forum Discussion
Moving average / moving variance
- Anonymous6 years ago
You are mixing 2 different measures. One is the 12-month average and the other is the sum of the 12-month averages. If you want to have these 2 morphed into one... then you'll need to write a SWITCH which will select the measure based on what time period is in scope.
Actually... on reflection, you can do something simpler: you can write a measure that will sum up the averages over the currently visible pieces of time. If you never go below the month level, then it's even easier. Hide the individual dates so that they can't be selected, leave only pieces of time from the month up and write:
sumx(
VALUES ( Calendar[YearMonth] ),[12M Average]
)
This will give you what you want.
Best
D
Hi Greg,
Thanks for your answer, but I guess this is not the problem in this case, though it may seem so.
If I just choose the year as my dimension, the value still remains the same, although there is no 'Total' lines involved.
402.382 / 12 = 33.532.
The calculation is correct.
The Gesamt is correct as well according to the formula and to what one would expect. That's because it's not just an average but a 12-month monthly moving average.
Best
D