Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Expression in List Box/Calendar

Hi All,

I have a list box containing my Year field. The dataset I'm using contains a few years worth of data, however I would like to write an expression in order for the list box to only show years that are equal to or greater than the year of today (ie. the current year).

So for example, today's date is 28/02/2013, so I would like to only show 2013, 2014, 2015 etc. in my list box for the user to be able to select from. 2012, 2011, 2010 etc. should not appear in the list box.

I have tried a few things but can't get it to work - is it possible?

Any help greatly appreciated!

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Expression in List Box/Calendar

Hi,

     Try this.

     Create a new list box (by Right clicking on the canvas). Here in field section, select Expression.

     Write below expression.

     if(Year >= year(today()),Year)

     Or you can also create the field in script which gives you the year equal to or greater then current year.

     Expression will be the same.

     hope this helps.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Expression in List Box/Calendar

Hi,

     Try this.

     Create a new list box (by Right clicking on the canvas). Here in field section, select Expression.

     Write below expression.

     if(Year >= year(today()),Year)

     Or you can also create the field in script which gives you the year equal to or greater then current year.

     Expression will be the same.

     hope this helps.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

Highlighted
Creator
Creator

Re: Expression in List Box/Calendar

Perfect, thanks - I used your first suggestion