Forum Discussion
Anonymous
6 years agoNot applicable
Break down Running Total into separate cases
Hello Everybody, I've seen lots of explanations to create a running/accumulating total, however the raw data I have begins with a running total and I would like break this down to the value added...
- 6 years ago
Hi Anonymous ,
Try this code for a calculated column:
Column = VAR _previousDate = CALCULATE(MAX('Table'[Date]), FILTER('Table', 'Table'[Date] < EARLIER('Table'[Date]))) RETURN 'Table'[Values] - CALCULATE(SUM('Table'[Values]), FILTER('Table', 'Table'[Date] = _previousDate))
amitchandak
Super User
6 years agoAnonymous ,
If you have non continous date
column =
var _last_date =maxx(filter(Table,Table[Date] <earlier(Table[Date])),Table[Date])
return Table[accumulated total]-maxx(filter(Table,Table[Date] =_last_date),Table[Date])
continuous Date
Total = Table[accumulated total]-maxx(filter(Table,Table[Date] =earlier(Table[Date])),Table[Date])
Refer this to have measures https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9