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: 
Not applicable

Running total at max date

Hi,

I'm using the following expression to accumulate figures in a column:

sum(aggr(
RangeSum(Above(
sum(
aggr(
sum({<ID = {'34'}>} Total <[Visit IP Country ISO],[Visit Date]> Signups)
,
[Visit IP Country ISO], [Visit Date])
)
, 0,
RowNo()))
,
[Visit IP Country ISO], [Visit Date]))


This works well, but the expression total is the sum of the accumulated values, whereas I need the expression total to be the running total at the max date. Can anyone think of a way to add this logic to the expression?


Here's a screenshot illustrating the output I'm after. 235, the running total at max date should be the expression total instead of 1001:

Screen Shot 2014-07-24 at 17.28.51.png


I've attached an example below. Apologies in advance, this is a repost, but I'm in a pinch and would like to get some help on this soon.


Matt

1 Solution

Accepted Solutions
Not applicable
Author

I've wrapped the expression in this: max(aggr( exp , [Visit Date]))  and it's working.

View solution in original post

6 Replies
Not applicable
Author

Attached with answer.

Select Max of Rows for Totals

Thanks

Not applicable
Author

Test.png

Not applicable
Author

Hi Ajay,

Max isn't an option for me, it needs to be done with set analysis.

Any ideas how the expression can be modified to do this?

Matt

Not applicable
Author

May I ask why Max wont work for you. It gives the desired result, doesn't it.

Not applicable
Author

I need to use the expression alone in a text box as well as the straight table and the max option won't work there. In the straight table I'll also be dividing it to create another expression (see column 'CR BL' above) and need the expression total based on max date for this.

Best,

Matt

Not applicable
Author

I've wrapped the expression in this: max(aggr( exp , [Visit Date]))  and it's working.