cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
salberts Frequent Visitor
Frequent Visitor

Re: Moving Average - Please Help!

In my application this approach collected an extra month's worth of data. The corrected forumula which worked for me is below. I tested this with manual calculations in Excel.

 

[Trailing 12 Month Average ] = DIVIDE(
CALCULATE(
SUM(Avg_sales[Sales_Count]),
DATESBETWEEN(
Avg_sales[List_Date],
FIRSTDATE(DATEADD(Avg_sales[List_Date],-11,MONTH)),
LASTDATE('Avg_sales'[List_Date])
)
),12)

albatroz Occasional Visitor
Occasional Visitor

Re: Moving Average - Please Help!

Did you find the solution? Facing the same problem

laltripti22 Frequent Visitor
Frequent Visitor

Re: Moving Average

Hi, how can this be calculated if there are duplicate dates?

I have a DateTime column which has values for different timestamps on the same date. All the values are to considered while calculating the Average.

DanLyu Occasional Visitor
Occasional Visitor

Re: Moving Average

Hello, @v-sihou-msft 

 

I exactly followed yoru approach but my moving averages are the same as the nomal averages for each month. It looks like other people are having the same issues. Any insights?

 

Thanks!