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

Generating sequence number in expression using a variable

Hi

I have scenario.

i need to generate sequence  in my expression using a variable

Variable is input box which end user able to give value from front end.

Example:   Input =1

then it is

1

2

3

4

5

6

..

.

numner of records.

I am able to get that using this below code

Rangesum(above(sum($(Sales Annual Growth Rate)),0,240))

1

2

3

etc

But i am looking for

it has to start from future dates that is greater then 2016

if(FiscalYear<=('Nov'&'/'&2016),0,Rangesum(above(sum($(Sales Annual Growth Rate)),0,240)))

This is giving

2011  0

2012  0

2013   0

2014   0

2015   0

2016   0

2017    7

2018    8

so here i want start 1 from 2017 ,so i am thinking instaed of 0 we need to give number of records before  2016,how to find this?

Please find the attached  file and do the needful

Regards

Thiru

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

May be try using this expression:

=Rangesum(Above(Sum($(Sales Annual Growth Rate)), (Year(Today()) + 1 - $(StartDate)), 240))


Capture.PNG

swuehl
Champion III
Champion III

Another option closer to your original approach might be

=Rangesum(above(if(FiscalYear<='Nov/2016',0,"Sales Annual Growth Rate"),0,240))