Forum Discussion

mzs1988's avatar
mzs1988
Frequent Visitor
3 years ago
Solved

Moving Averages - DAX and Power BI

Hi ,    I'm trying to implement a moving average in Dax.  I saw multiple solution and they are working fine.  However I do not understand why the below solution does not work. Espacially that it se...
  • amitchandak's avatar
    3 years ago

    mzs1988 , Try a meausre like

     

    calculate(averageX(Values('Query1'[device_id]) , calculate(Sum(Query1[completion_time] ))) , DATESINPERIOD('Calendar Relative'[Date],max('Calendar Relative'[Date]), -3 , DAY))

     

    Make sure Calendar Relative is marked as date table