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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Box Object Issue

I have a list box for Year and I have 10 Years in the list box like 2015,2014,2013,2012,...............etc.

I would like to display only 3 years (2015,2014,2013). I still want the data for all the years but just for  list box I need only 3 years.  So the end user will not be able to select anything beyond 3 Years. 

Is that doable and how can we do that

1 Solution

Accepted Solutions
sunny_talwar

Try this:

If(Match(Year, 2013, 2014, 2015), Year)

Alternatively this should also work:

=Aggr(Only({<Year = {'2013', '2014', '2015'}>} Year), Year)

View solution in original post

5 Replies
sunny_talwar

Try this:

If(Match(Year, 2013, 2014, 2015), Year)

Alternatively this should also work:

=Aggr(Only({<Year = {'2013', '2014', '2015'}>} Year), Year)

Not applicable
Author

I wanna use dynamic year, like MAx Year, MAx(Year)-1 etc

sunny_talwar

May be this:

=Aggr(Only({<Year = {'$(=Max(Year))', '$(=Max(Year)-1)', '$(=Max(Year)-2)'}>} Year), Year)

Not applicable
Author

Sorry I meant Year(Today()), Year(Today()-1 etc

sunny_talwar

Try this:

=Aggr(Only({<Year = {$(=Year(Today())), $(=Year(Today())-1), $(=Year(Today())-2)}>} Year), Year)