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

two listboxes on same field

Hello,

I have a field where I have different categories. The categories basically belong to two different groups so I have created two different listboxes on those cateogires. One lisbox has one group of categories and the other listbox has the other group of categories. Both listboxes are using the same field but I am using a condition in the expression to fetch only the relevant categories

The scenario is that from each listbox only one value can be selected, but we should give the ability to select from both listboxes or one listbox at a time

My problem is that when I select from one listbox, it clears the other listbox. I want to be able to select from both listboxes. How can I do this

Regards

Arif

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Create another field identical to the one you use in the list box

Load

..

field1,

field1 as secondfield

...

In this way you can use both fields (that are equal) in 2 list boxes

giakoum
Partner - Master II
Partner - Master II

alternate states would be my approach. And having two different fields linked between them instead of one and using an expression to separate them.

ThornOfCrowns
Specialist II
Specialist II

You might also want to have a look at AND mode.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/07/19/and-mode

giakoum
Partner - Master II
Partner - Master II

This way when the user clicks on one field, it automatically will limit the other to the common row values. It will not be useful in this case.

MarcoWedel

Hi Syed,

from my point of view there is a logical issue with your combined field.

If you have the requirement to select some values out of one "group" of this field and to independently select some other values out of the second "group" then you are clearly talking of two different dimensions i.e. your field should be splitted into two fields.

Can you post some example to clarify the kind of data in this field an why it is grouped?

regards

Marco

Not applicable
Author

Ok Here is a very simple example. I am plotting number of officers against Towns. I have two listboxes. One listbox has My Town, and the other listbox has other towns. I want the user to be able to select my town and then other towns to compare my town against other towns. However, when I select my town, it clears the other filter and vice versa

I want it  so that I can either see all the towns if the selection is not made or compare my town against other towns. Please remember that my town and other towns should be separate lisboxes. This is just an example but my actual scenario is very similar to this so if we solve this, we solve the actual problem

Arif

Not applicable
Author

Can you please check your solution using the attached simple example. I want my town and other towns to be separate lisboxes and still select which town I want to compare against my town

jagan
Luminary Alumni
Luminary Alumni

Hi Syed,

PFA for solution.

Regards,

Jagan.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

This is just what the Alternate States feature is for. See attached for an update to your sample using alternate states. See the "What's New in QV11" app for more alt states examples.

-Rob

http://masterssummit.com