Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
ID | Car | Van | SUV | Truck | Bus | SmartCar | Header 8 | Header 9 |
---|---|---|---|---|---|---|---|---|
1 | x | x | x | x | x | x | ||
2 | x | |||||||
3 | x | |||||||
4 | ||||||||
5 | x |
List Box:
Car
Van
Suv
Truck
Bus
etc...
Use crosstable load - see attached
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.
Use crosstable load - see attached
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.