Forum Discussion
Bfaws
Helper III
6 years agoMeasure for rolling 12 month average
Hi, I`m looking for a measure to calculate average Full time equivalent (FTE) over a 12 month rolling period. I have a table that shows the sum of FTE for each month. What I would like is an ad...
Anonymous
6 years agoNot applicable
Hi Bfaws ,
You can try this measure.
12monthsRollingAvg =
var _a = MAX('Table'[Report Date])
var _12months = Minx(DATEADD('Table'[Report Date],-12,MONTH),'Table'[Report Date])
Return
//To get average of all the report Dates
//CALCULATE(Average('Table'[Sum of FTE]), Filter(ALL('Table'),'Table'[Report Date] <=_a && 'Table'[Report Date] > _12months))
//To get Average Dates where previous data of 12 months is available
SWITCH(
TRUE(),
CountROWS(FILTER(ALL('Table'),'Table'[Report Date] <=_a && 'Table'[Report Date] > _12months)) = 12,CALCULATE(Average('Table'[Sum of FTE]), Filter(ALL('Table'),'Table'[Report Date] <=_a && 'Table'[Report Date] > _12months))
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)