Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Running Total Continuing Past Date Filter

Good afternoon,   I am trying to add a running total to my graph, but using the built-in quick measure, the running total goes past the date filter (for the past 14 days). See image below,   ...
  • Greg_Deckler's avatar
    3 years ago

    Anonymous Try this: Better Running Total - Microsoft Power BI Community

    Better RT = 
        VAR __Date = MAX('Table'[Date])
        VAR __Table = FILTER(ALLSELECTED('Table'),[Date] <= __Date)
    RETURN
        SUMX(__Table,[Value])

    In your case you may want:

    Better RT = 
        VAR __Date = MAX('Table'[Date])
        VAR __Table = FILTER(ALLSELECTED('Table'),[Date] <= __Date && [Date] <= TODAY())
    RETURN
        SUMX(__Table,[Value])