Knowledge Drop

How can I reverse a running total so that it goes from bottom up?

  • 7 May 2021
  • 1 reply
  • 484 views

Userlevel 3

Last tested: Jan 21, 2019
 

Running Total Down:
sum(offset_list(${measure},1-row(), row()))

Running Total Up:
sum(offset_list(${measure},0,count(${dimension})-row()+1))

 

This content is subject to limited support.                

 


1 reply

Works great unless some of your rows are nulls in which case:

sum(offset_list(${measure},0,count(coalesce(${dimension},0))-row()+1))

 

Reply