Forum Discussion
mshashmi
9 years agoFrequent Visitor
Moving Average changes when using a Slicer
Hi I have a table and a measure is present to calculate moving average. I have a date slicer present too. Moving average of mine is for previous 3 weeks. So whn any date range is selected, the da...
- Anonymous9 years ago
Moving Average= CALCULATE( AVERAGEX( lineDataClosed, SUM(lineDataClosed[Closed Count])/3 ), ALL(lineDataClosed), DATESINPERIOD( lineDataClosed[Week], LASTDATE(lineDataClosed[Week]), -21, DAY ) )
Try this and let me know the result.
mshashmi
9 years agoFrequent Visitor
Anonymous
Moving Average= CALCULATE(AVERAGEX(lineDataClosed,sum(lineDataClosed[Closed Count])/3),DATESINPERIOD(lineDataClosed[Week],LASTDATE(lineDataClosed[Week]),-21,DAY))
This expression is giving me the result as per now. Where do I need to place All() or ALLEXCEPT() to get the desired result?
Thanks
Anonymous
9 years agoNot applicable
Moving Average= CALCULATE( AVERAGEX( lineDataClosed, SUM(lineDataClosed[Closed Count])/3 ), ALL(lineDataClosed), DATESINPERIOD( lineDataClosed[Week], LASTDATE(lineDataClosed[Week]), -21, DAY ) )
Try this and let me know the result.
- mshashmi9 years agoFrequent Visitor
Anonymous
Thanks a lot