Forum Discussion

Rajendrabobade's avatar
5 years ago
Solved

Last 3 month Average

Hello , I need last 3 month average dax , based on current month  . there is no selction for month .  eg: for now there is november is current month .    Thank you .            
  • camargos88's avatar
    5 years ago

    Rajendrabobade ,

     

    If you have a date table, you can use this measure:

    _Last3M = 
    VAR _today = EOMONTH(TODAY(), 0)
    VAR _tbl = DATESINPERIOD('Calendar'[Date], _today, -3, MONTH)
    RETURN  CALCULATE(AVERAGE('Table'[Sales]), _tbl)