Forum Discussion
Spencer
9 years agoHelper II
Calculating Rolling Measure
Hi, I have a table which displays how many people are in each department at the end of every month. I'm looking at creating a rolling 12 month measure that gives you the average amount of peopl...
BhaveshPatel
9 years agoSuper User
Moving AverageX 12 MONTHS :=
AVERAGEX (
DATESINPERIOD (
DeptHC[MonthPT],
LASTDATE(DeptHC[MonthPT]),
-12,
MONTH
),
[DEPTHC HEADCOUNT]
)
This would solve your problem.
- Spencer9 years agoHelper II
Hi BhaveshPatel thanks very much for your response.
On the second last line of your formula, do you need a SUM or AVERAGE function before you name [DEPTHC HEADCOUNT]?
Thanks
- BhaveshPatel9 years agoSuper User
It should be average as you are calculating AVERAGE.
- Spencer9 years agoHelper II
Ok, your equation appears to be averaging the headcount against the departments though, instead of averaging the amount of people overall (Should be around 300 average, as opposed to 9). Hopefully you can see in the screenshot below.