Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative Total should not start from base value

Hi,    I am interested in calculating cumulative value. However, when I filter by date, the value again starts from the base value of that month, continuing cumulatively (red).  What I actually wa...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Just found my solution. FYI:

     

    Total Events-Cumulative3 =
    VAR MaxDate = MAX ( data[Event Date] )    -- Saves the last visible date
    RETURN
    CALCULATE (
    [Total Events],                                                   -- Computes sales amount
    data[Event Date] <= MaxDate,                         -- Where date is before the last visible date
    ALL ( 'Calendar' )                                               -- Removes any other filters from Date
    )