Forum Discussion

rsrgerge's avatar
rsrgerge
Regular Visitor
3 years ago
Solved

Modifying Cumulative Measure

HI,   I want try and modify the below cumulative measure to ignore dates after a certain point (Today's date). The measure provides a cumulative sum of a value against the report date. I want to tr...
  • pankaj_lp's avatar
    3 years ago

    Try using this :

    Cash In Cumulative =
    VAR MaxReportDate = MAX('Cash_View'[Report Date])
    VAR CutOffDate = TODAY()

    RETURN
    CALCULATE(
    SUM('Cash_View'[Amount]),
    FILTER(
    ALLSELECTED('Cash_View'[Report Date]),
    ISONORAFTER('Cash_View'[Report Date], MaxReportDate, DESC)
    && 'Cash_View'[Report Date] <= CutOffDate
    ),
    'Cash_View'[InOut] = "Cash In"
    )