I have a dataset starting from 2012 until now, following this pattern :
For each month of each year I do the following :
Budget January 2013 = Production January 2012
Budget January 2014 = (Production January 2012 + Production January 2013) / 2
Budget January 2015 = (Production January 2012 + Production January 2013 + Production January 2014) / 3
and I need the total to be the sum of the monthly averages i.e. :
average of January + average of Febuary + …
Production Budget =
VAR _min = 2012
VAR monthlyBudget= CALCULATE(AVERAGEX(‘Table’,[Production]]),FILTER(ALL(Dates),(Dates[Year]>=_min && Dates[Year]<MAX(Dates[Year])) && Dates[MonthName]=MAX(Dates[MonthName])))
The average for each month works fine, however the total I get is wrong and I don’t know what to change in the formula to fix it.
Can somebody help me ?