3 Replies Latest reply: May 9, 2015 8:42 PM by Sunny Talwar

# Calculating the Max of a cumulative progression

Hello Qlik Community,

Can anyone help with an expression or technique that would help isolate the "peak" value of a cumulative expression, when assigned in a straight table?

In the following set of records, I'd like to be able to isolate when the cumulative value peaked, and what that peak value was, but if possible by doing this entirely in user-interface (i.e. not adding any aggregation tables, or rescripting).

Is there a way to isolate the cumulative maximum of an expression when aggregated across a dimension?

[INTERVAL_ATTRIBUTES]:
YEAR, AMOUNT
1, 250
2, 400
3, -100
4, 450
5, -800
6, 520
7, -190
8, -180
]
;

• ###### Re: Calculating the Max of a cumulative progression

Try this expression in a text box:

=Max(Aggr(RangeSum(Above(Sum(AMOUNT), 0, 99999)), YEAR))

Output is 1000

Is this what you were looking for? (PFA)

Best,

Sunny

• ###### Re: Calculating the Max of a cumulative progression

Yes, sunindia, thank you!

RangeSum ( Above ())  combinations, brilliant!

• ###### Re: Calculating the Max of a cumulative progression

Awesome!