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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
riceball
Contributor
Contributor

Simplified expression for rangesum set analysis ( 10yrs data accumulation)

Hi,

I'm facing some problem with following script ( Please see attached sample as well). Basically, I would like to accumulate 10 years of Qty based on my dimension year. I wonder if there is any simplified and dynamic scripting so that i do not have to hardcode every year from 2019 onwards. 

Greatly appreciate your help on this!

Expression:

=IF(CalendarYear='2019',
Sum({$<CalendarYear={">=2009<2019"}>} Total Qty),

IF(CalendarYear='2020',
Sum({$<CalendarYear={">=2010<2020"}>} Total Qty),

IF(CalendarYear='2021',
Sum({$<CalendarYear={">=2011<2021"}>} Total Qty),

Rangesum(Above(SUM(Qty),1,rowno())))))

 

 

Labels (1)
1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

Hi, have you tried?: Rangesum(Above(SUM(Qty),1,10))

View solution in original post

2 Replies
rubenmarin
MVP
MVP

Hi, have you tried?: Rangesum(Above(SUM(Qty),1,10))

riceball
Contributor
Contributor
Author

Yes, it works! Thank you so much!