Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
evan_kurowski
Specialist
Specialist

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]:
LOAD * INLINE [
YEAR, AMOUNT
1, 250
2, 400
3, -100
4, 450
5, -800
6, 520
7, -190
8, -180
]
;

20150509_cumulative_column_aggregations_2.png

1 Solution

Accepted Solutions
sunny_talwar

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

View solution in original post

3 Replies
sunny_talwar

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

evan_kurowski
Specialist
Specialist
Author

Yes, sunindia, thank you!

RangeSum ( Above ())  combinations, brilliant!

sunny_talwar

Awesome!