Forum Discussion
mzs1988
3 years agoFrequent Visitor
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...
- 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
mzs1988
3 years agoFrequent Visitor
thank you amitchandak for your fast response.
The measure you gave me shows a single day average. I tried putting in a summarize funcation or a table visuals with all possible machines and dates and gives the same result. This is similar to what I'm seeing in the original code I shared in the post.