Page 1 of 1

[SOLVED] Cumulative Total, missing month

Posted: Thu Nov 14, 2019 2:08 am
by Bernard Heymans
Hi

I created a measure that calculate the sum as from begining of time...

Qty Apples Cumul = CALCULATE( [Qty Apple] ,
FILTER( ALL('Calendar'[DDay]) ,
'Calendar'[DDay] <= max(Apples[date] )
)
)


BUT if there is no entry for one month, it will not show a cumulated result.

see red cell for december 2017 & july 2018 in attached exemple.


Note: I don't want to work on TotalYTD as my total sould run over years.


Thanks for your help.

Bernard.

Re: Cumulative Total, missing month

Posted: Thu Nov 14, 2019 8:14 pm
by Bernard Heymans
SOLVED....

QtyCherry Cumul :=

VAR laatstedag = EOMONTH( CALCULATE( MAX( Cherry[date] ); ALL( Cherry));0)

return
IF( MAX('Calendar'[DDay] ) <=laatstdag ;
CALCULATE( [Qty Cherry] ; FILTER( ALL( 'Calendar'[DDay] ); 'Calendar'[DDay] <= max( 'Calendar'[DDay]))))