Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
riceball
New 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())))))

 

 

1 Solution

Accepted Solutions

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

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

2 Replies

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

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

riceball
New Contributor

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

Yes, it works! Thank you so much!