Countdown metric

#1

I know how to do a cumulative sum metric using rolling that would increment by one until ResetMetric is non-zero.

rolling(‘SUM’, identity(1), ResetMetric) --> 1, 2, 3, 4, 5, 0, 1, 2, 3, …

How can I do a countdown metric that decrement by one until ResetMetric is non-zero?
That would represent something like DaysUntilEvent for example
-----------------|-------------
5, 4, 3, 2, 1, 0, 10, 9, …

0 Likes