Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I how to select current year’s list box by default

HI All,

I am using year in one list box selection. It allows (multiple selections).

My condition is by default it has to show current year. If they select multiple years it has take max of the year values.

I am using this below expression but it is not working .Could you please help?

=If(Match(Max([Year]),year(Today()))=0,Max([Year]),year(Today()))

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

create a variable vMaxYear

=if(isnull(getfieldselections(Year)),year(today()),max(Year))

Now, the expression becomes: sum({<Year={'$(vYear)'}>}field)

depending on ur expression but the set remains the same

Regards

View solution in original post

3 Replies
Not applicable
Author

suppose u have 2012,2011 & 2010 in a list box and using check  boxes multiple selection is allowed.

Now what result u want on which selection ?

Not applicable
Author

HI,

I have data 2015,2014,2013,2012,2011,2010 in a list box.

.By default i want 2013.But if they select 2013,2014,2015 then the report should reflect only for 2015.

Thanks

Not applicable
Author

create a variable vMaxYear

=if(isnull(getfieldselections(Year)),year(today()),max(Year))

Now, the expression becomes: sum({<Year={'$(vYear)'}>}field)

depending on ur expression but the set remains the same

Regards