Forum Discussion
AOD
Helper III
5 years ago7 Days Rolling calculation
Hi All, Need help in calculating 7 days rolling DAX formula based on Value field. Thanks in advance for helping.
- 5 years ago
Hi AOD
It depends what you want to achieve, but you can use dateadd, datesinperiod, etc functions for getting your results.
Thanks,
Ankit
amitchandak
Super User
5 years agoAOD , with help from a date table
Rolling 7 days = CALCULATE(sum(Sal[Sales Amount]),DATESINPERIOD('Date'[Date],max('Date'[Date]),-7,Day))
or
Rolling 7 days = CALCULATE(sum(Sal[Sales Amount]),DATESINPERIOD('Date'[Date],max(Sales[Sales Date]),-7,Day))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.