Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kunkulis
Creator
Creator

Expand ListBox if valu selected

Hello,

I have a ListBox of Years from 2006 till 2020.
year.PNG
Now with an expression I have made it into this:
year1.PNG

Now what I would like to achieve is, if you select 'Older' it doesn't select 2006-2015 years, but expands the list.
Doesn't really matter how, the main thing would be so it doesn't create cluster.

Labels (5)
1 Solution

Accepted Solutions
Kunkulis
Creator
Creator
Author

Managed to find the solution.

Using "<Expression>" in fields and this was my statement

=if(Match([Year],'2020','2019','2018','2017','2016'), [Year],if(Match([Year],'2015','2014','2013'),'Older'&'/'& [Year]))

Select 'Show as TreeView' and its done

View solution in original post

2 Replies
Kunkulis
Creator
Creator
Author

Managed to find the solution.

Using "<Expression>" in fields and this was my statement

=if(Match([Year],'2020','2019','2018','2017','2016'), [Year],if(Match([Year],'2015','2014','2013'),'Older'&'/'& [Year]))

Select 'Show as TreeView' and its done

marcus_sommer

You may reach it with the use of several actions which query the selections and show/hide (probably with the help of some variables) multiple listboxes and de-select the values appropriate.

Like it already sounds I wouldn't go this way else I would probably use a cyclic dimension-group within the listbox. This may native fields from the datamodel or just calculated dimensions within the group. The important point is not to include a cluster of values like your created 'Older' else just those values which are intended. I think I would create 3 dimensions with 'Current Years', 'Older Years' and 'All Years'.

- Marcus