This is actually a bit harder around the totals.
I’ve had to work on it for a while and have come up with a solution.
There’s a little more to it than you would think.
The reason is because of the context that comes from the slicer. That really messes with the totals.
What you need to do is actually create a different table for the slicer like so
With no relationship to the model
Then with the correct formula you can get this
Reverse Cumulative =
VAR MonthFilter = ISFILTERED( 'Month of Year Filter'[Month Of Year] )
VAR FilteredMonth = SELECTEDVALUE( 'Month of Year Filter'[Month Of Year] )
VAR TotalCheck = HASONEVALUE( Dates[Month Of Year] )
VAR Cumulative = CALCULATE( [Number of Sales over time],
FILTER( ALL( Dates[Month Of Year] ),
Dates[Month Of Year] >= MIN( Dates[Month Of Year] ) ))
IF( TotalCheck = FALSE(),
MAXX( SUMMARIZE( Dates, Dates[Month Of Year], "CumulativeTotal", Cumulative ), [CumulativeTotal] ),
IF( MonthFilter = FALSE(),
IF( FilteredMonth = SELECTEDVALUE( Dates[Month Of Year] ), Cumulative, BLANK() ) ) )
So as you can see not as simple as initially.
Hopefully this works for you.
I’ve attached here also.
Testing Reverse Cumulative.pbix (300.0 KB)