Forum Discussion
Non- Moving Average with Slicer
Hi there,
I have my measure below but its giving me a moving average instead of the 6 months static.
I am trying to get the Result column in the second image below but for only 6 months, so it doesn't change when the slicer date changes. Is this possible?
Hi lherbert501,
Please try:
Average = var _a = MAXX('RS_Dates',[DateFull]) return CALCULATE(AVERAGEX(ALL('Table'),[Outstanding]),DATESINPERIOD('RS_Dates'[DateFull],_a,-6,MONTH))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- amitchandak
Super User
lherbert501 , You have try a measure like this example
6 Month Avg = CALCULATE(AverageX(Values('Date'[MONTH Year]),calculate(Sum('Table'[Value)))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))- lherbert501
Post Prodigy
Hi amitchandak
Unfortunately, this measure outputs the same as the running average, as displayed in the image.
Would you have any idea how to get to the required result column??
Thanks
Liam
- lherbert501
Post Prodigy
- v-jianboli-msft
Community Support
Hi lherbert501,
Please try:
Average = var _a = MAXX('RS_Dates',[DateFull]) return CALCULATE(AVERAGEX(ALL('Table'),[Outstanding]),DATESINPERIOD('RS_Dates'[DateFull],_a,-6,MONTH))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- lherbert501
Post Prodigy
Thankyou v-jianboli-msft
- lherbert501
Post Prodigy
Hi v-jianboli-msft ,
If the "Outstanding" was a measure and not in a column, would this still work or change at all?
Thanks
Liam