Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dukane24
Contributor III
Contributor III

Configure list box to use a field where data source contains multiple selections

I'll start by saying that I am new to Qlikview.  It's quite possible there is a simple solution to my problem that I am not seeing.

My problem is that some of the columns in my data source can have multiple selections.  For example, in the "Department" column, the database user can choose "Dept A" which is fine, or they can choose multiple departments.  The database handles this by separating the selections with a semicolon, so they show as, "Dept A; Dept C, Dept D", etc.  I believe my challenge is two fold: I need to set up the List Box for this field so that it only shows single department names instead of all of the multiple selections that people have chosen.  Also I need to set it up so that when "Dept B" is chosen in the list box, it shows all of the single selections with "Dept B", but also instances where the field CONTAINS "Dept B", which will cover instances where multiple departments were chosen.

I appreciate any suggestions you may have.

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable

If I got the question right, the attached is the answer.

View solution in original post

4 Replies
Anonymous
Not applicable

If I got the question right, the attached is the answer.

dukane24
Contributor III
Contributor III
Author

Thank you Michael! This is exactly what I was looking for.  I thought I'd have to do some acrobats with a list box expression to limit the possible field selections but this addition to the script solves both problems at once.

Anonymous
Not applicable

A little follow up:

In the example, I joined the additional table to the original one.  In real life it may be better not to join, keep as a separate table, because it creates additional rows.  You don't want this if there are many columns in the table.

Regards,

Michael

dukane24
Contributor III
Contributor III
Author

Thanks Michael.  After I made this change I realized that it was adding rows but tried loading it as a separate table instead as you suggested and it worked.

Thanks again!