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

Knowledge Drop

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.                

Comments
Logan1
Bronze 1
Bronze 1

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

sum(offset_list(${measure},0,count(coalesce(${dimension},0))-row()+1))
Version history
Last update:
‎05-07-2021 09:48 AM
Updated by: