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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Retain accumulation after selection

Hi Community,

I want to add a new column that Sums the last 4 weeks of Value2.

I used accumulate with 4 step back. But my problem is when I select few weeks Example ,week 5 to week 10, the Accumulated values changes.

Any other solution to do this?

Please see attached qvw to view my sample file.

Thanks in advance!

Ronald

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Try something like this (without using the accumulation option) as expression:

=aggr(rangesum(above(sum({1}Value2),0,4)),Week)

or

=aggr(rangesum(above(sum({<Week>} Value2),0,4)),Week)

edit:

Week field load order must be in chronological order to make this work correctly.

View solution in original post

1 Reply
swuehl
Champion III
Champion III

Try something like this (without using the accumulation option) as expression:

=aggr(rangesum(above(sum({1}Value2),0,4)),Week)

or

=aggr(rangesum(above(sum({<Week>} Value2),0,4)),Week)

edit:

Week field load order must be in chronological order to make this work correctly.