Cumulative sum  

  RSS

Piyush Goyal
(@gpiyush152)
Active Member Registered
Joined: 1 year ago
Posts: 5
07/06/2018 11:18 am  

how to get cumulative sum in power bi?

piyush goyal


ReplyQuote
pankaj Gupta
(@pankaj-gupta)
Active Member Moderator
Joined: 1 year ago
Posts: 6
07/06/2018 11:39 am  

Hi, 

Please use below code to get cumulative sum - 

Cumulative_sum =
CALCULATE(
SUM(Table[ColumnA]) + SUM(Table[ColumnB]) + SUM(Table[ColumnC]);
ALL(Table[TIME_PERIOD]);
FILTER(Table;
Table[TIME_PERIOD] <= MAX(Table[TIME_PERIOD]) &&
Table[SITUATION] = "OK"
)
)
The ALL(Table[TIME_PERIOD]) will force the measure to ignore the time period filter.

 


ReplyQuote
Share:
  
Working

Please Login or Register