Forum Discussion
Anonymous
2 years agoNot applicable
Cummilative sum after a specific month
Hi I want to display the cummilative sum only from August months onward but not able to acheive this .
In Aug , Final FG STK Total should be 221.362 +(-69.45) ( in current it is showing only -69.45) In Sep , Final FG STK Total should be 221.362 +(-69.45) + 10.55 (in current it is showing only 10.55) & so on
Stuck in getting those values.
Hi Anonymous
Try this calculated column
CALCULATE ( SUM ( 'table'[rolling total] ), FILTER ( ALL ( 'table' ), 'table'[month] >= 7 && 'table'[month] <= EARLIER ( 'table'[month] ) ) )Hi Anonymous ,
You could try below code:-
Cumulative_Total = VAR CurrentMonth = [Month] var _result = CALCULATE( SUM('Table (3)'[Rolling_total]), FILTER( ALL('Table (3)'), [Month] <= CurrentMonth && [Month] >= 7 ) ) RETURN IF('Table (3)'[Month] >=8,_result)Output:-
3 Replies
- danextian
Super User
Hi Anonymous
Try this calculated column
CALCULATE ( SUM ( 'table'[rolling total] ), FILTER ( ALL ( 'table' ), 'table'[month] >= 7 && 'table'[month] <= EARLIER ( 'table'[month] ) ) )- AnonymousNot applicable
Hi danextian ,
You made my day:)
- Samarth_18
Community Champion
Hi Anonymous ,
You could try below code:-
Cumulative_Total = VAR CurrentMonth = [Month] var _result = CALCULATE( SUM('Table (3)'[Rolling_total]), FILTER( ALL('Table (3)'), [Month] <= CurrentMonth && [Month] >= 7 ) ) RETURN IF('Table (3)'[Month] >=8,_result)Output:-