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: 
anthony_kinsell
Creator
Creator

List Box data - restrictions

Hi,

If I have a list box that displays YearMonth in the format MMM-YYYY from say Jan 2009 to Dec 2026 how do I restrict the valuse shown to say Jan'11 to Dec'14?

4 Replies
luis_pimentel
Partner - Creator III
Partner - Creator III

At the ListBox Properties, "General Tab", you can set a "Expression" inestead of a Fieldname. Then, in that expression, add any conditions you want to. This <Expression> option should be at the bottom of your fieldnames list.

The snapshot is in Spanish, sorry:

manojkulkarni
Partner - Specialist II
Partner - Specialist II

use expression instead of field : Expression will be if(YearMonth>='Jan-2011' AND YearMonth <='Dec-2014',YearMonth)

anthony_kinsell
Creator
Creator
Author

Cheers Guys,

I was trying to put the expression is the 'expressions' tab & it wasn't working.

manojkulkarni
Partner - Specialist II
Partner - Specialist II

=if(MY>=Date(MakeDate(2013,01,01),'MMM-YY') AND MY <=Date(MakeDate(2013,12,31),'MMM-YY'),MY)

MY is your month Year in the format Jan-13. Change the format according to your requirement.