Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?
Solved! Go to Solution.
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.
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.
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
@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))
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |