Forum Discussion

lherbert501's avatar
lherbert501
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

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 i...
  • v-jianboli-msft's avatar
    4 years ago

    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.