Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setting default values in List box

HI All,

I have selction for five years 2009,2010,2011,2012,2013.How to set default view for only two years current and previous (2012,2013) in an List box selection.

Can you please help me ASAP.

Thanks,

Rahul

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

ok

right clik on that sheet --->Go to trigger tab-->

add action on ActiveSheet-->click -->Add-->selection-->select in field

then put YearFiledname above and in search string write (2012|2013)

then ok

hope it helps

View solution in original post

10 Replies
nizamsha
Specialist II
Specialist II

=Max(Year)   &  '-'  &min(Year)-1

i thnk it will be useful 

Not applicable
Author

SET vMaxYear = Max(Year)

Load *

FROM$(SourceDir)Test.QVD
(
qvd) Where Year > $(vMaxYear)-2;

Not applicable
Author

Hi,

Choosse edit expression from drop down of field list of list box. In that you can write

if(Year=max(Year) or Year=(max(Year)-1),Year) 

it will always take top two values always...

Hope it helps..

Not applicable
Author

Hi,

Choosse edit expression from drop down of field list of list box. In that you can write

if(Year=max(Year) or Year=(max(Year)-1),Year) 

it will always take top two values always...

Hope it helps..

Not applicable
Author

Hi All,

Thanks for you responses. Actually, i am looking for this .Whenever I come to this sheet i want to Activate only for current year and previous year. If user wants he can select whatever he wants.

Year.png

er_mohit
Master II
Master II

ok

right clik on that sheet --->Go to trigger tab-->

add action on ActiveSheet-->click -->Add-->selection-->select in field

then put YearFiledname above and in search string write (2012|2013)

then ok

hope it helps

jagannalla
Partner - Specialist III
Partner - Specialist III

To work dynamically use this code.

='('&Year(Today())&'|' &(Year(Today())-1)&')'

ankitaag
Partner - Creator III
Partner - Creator III

and what if when User selects any other filter and then click Clear All, Then what will be the selection. Trigger will not fire because it's on Activate sheet.

Any suggestions?

Not applicable
Author

Fantastic post... worked for me. Thanks