• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Time intelligence measures (non-continuous)?

redroller

New Member
With a DAX measure as below, is there a way to adapt the date range to reflect the last 30 days with observations instead of 30 continuous calendar days?
The source data does not contain records for each calendar date.

30D Mov Avg =
VAR NumDays = 30
VAR RollingCount = CALCULATE(COUNT(‘ServiceRecord’[Activity ID]), DATESINPERIOD(‘ServiceRecord’[Service Date], LASTDATE(‘ServiceRecord’[Service Date]), -NumDays, DAY))
RETURN
RollingCount/NumDays
 
Back
Top