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

How to limit what is displayed in a YEAR list box

My first post

I have searched before posting, but I am a real rookie with Qlikview, so forgive me if I have not searched well enough.  It is probably because I do not know the terminology yet.

We have transactions in our system going forward to 2015 due to accruals, but I do not want users to see or be able to select any YEAR into the future.

How can I write an expression in a list box to only display years up until current year (2012)?

Current YEAR selection:

2007  2008  2009  2010  2011  2012  2013  2014  2015

I wish the list box only to display:

2007  2008  2009  2010  2011  2012

Regards

Thor

13 Replies
Miguel_Angel_Baeyens

Hi Thor,

If field is Year and the search string is an expression, add the "=" sign at the beginning of the expression, so Field is

YEAR

and Search String is

=Year(Today())

Both YEAR values and Year() must return in the same format, otherwise the search will likely fail.

Hope that helps.

Miguel

Not applicable
Author

Hi Thor,

you ar every close:

it should be

=Year(Today())

with the preceding "=" and Today() with brackets

Note:

For testing purposes you can create your search string(s) in a textbox and see what's happening.

RR

Not applicable
Author

Textbox tip was great   Thanks.

It returns 2012.

Turns out I misunderstood.  I thought the trigger would activate upon opening, but it triggers when you change sheets.  That is fine. 

Thanks again for great help. 

Not applicable
Author

Thanks Miguel