How to formulate Last n days in DAX?
It can be achieved using the combination of CALCULATE & DATESINPERIOD function.
Formula to sum up values for last 10 days
Note the use of a calendar table in the DATESINPERIOD. It is pretty common to have a “date” dimension & I’ve used it the DateKey from the dimension as the “date” column which is required by the DATESINPERIOD function.
You can use the above example as a starting point now.