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

Multiple values in a list box...


The below is my straight table I have 45 columns that I would like to show in a list box and be able to select best approach to solve?   For example,I would select Car in a list box and only ID 2 values would show.

IDCarVanSUVTruckBusSmartCarHeader 8Header 9
1xxxxxx
2x
3x
4
5x

List Box:

Car

Van

Suv

Truck

Bus

etc...

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Use crosstable load - see attached

View solution in original post

3 Replies
JonnyPoole
Employee
Employee

You could load a new table in the data model using a series of resident loads off the main table. The new table will associate all the vehicle types to the IDs where they have an 'X'.

Types:

Load

     ID,

     'Car' as Type

resident <TableWithIDs>

where Car='x';

concatenate (Types)

Load

     ID,

     'Van' as Type

resident <TableWithIDs>

where Van='x';

concatenate (Types)

Load

     ID,

     'SUV' as Type

resident <TableWithIDs>

where SUV='x';

etc...

Then add 'Type' as a list box. When you select Car it will filter the main data set for only the IDs belonging to that Type.

Anonymous
Not applicable
Author

Use crosstable load - see attached

ToniKautto
Employee
Employee

I think you need to eliminate the blank (empty string values) from the cross table.

Adding SET NullInterpret =''; to the script should do the trick.