Forum Discussion
desiree
10 years agoFrequent Visitor
Need help - Moving Average Formula ERROR
Hello, I am new to Power BI and DAX. I am trying to create a measure for calculating the moving average of 3 monthly sales by area on Power BI Desktop/Service. I have googled many websites but...
- 10 years ago
HI, just did one of these this morning for a 6 wk rolling average $/kg:
calculate(sum(Data[Operating]),DATESBETWEEN(Data[Week start],LASTDATE(Data[Week start])-42,FIRSTDATE(Data[Week start])))
/
calculate(sum(Data[kg]),DATESBETWEEN(Data[Week start],LASTDATE(Data[Week start])-42,FIRSTDATE(Data[Week start])))
ankitpatira
10 years agoCommunity Champion
desiree And dates in calendar table matches with dates in sales table ?
desiree
10 years agoFrequent Visitor
ankitpatira , yes.. I used pivottable to get the unique dates from Sales table to prepare Calendar table.