Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Un-concat'ing

Hi,

I want to create a list box that separates out a field that has comma's as separators.

i.e


Default List Box Values:

Asia, BAU, Regions

Asia, Project, Regions

BAU, Ops

Ops, Project

CD, Project

What I want is the same values, but separately selectable:

Asia

BAU

Project

Regions

Ops

CD

I'm happy to hardcode the list somewhere and to be able to filter on any record that has one or more of the selected values.

Any help would be appreciated.

Thanks

Simon

1 Solution

Accepted Solutions
rustyfishbones
Master II
Master II

Hi,

Please see the attached file, I hope it helps

View solution in original post

6 Replies
tresesco
MVP
MVP

Use Subfield() function. Like: Subfield(Fieldname, ',' , 1)

ThornOfCrowns
Specialist II
Specialist II

If you're happy to "hardcode" the list, make an Inline Table and use that, perhaps?

rustyfishbones
Master II
Master II

try using the SUBFIELD()

something like

2014-01-23_1452.png

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You'ld better do this in your load script because a list box has to refer to some field in your data model.

The SUBFIELD() function has a 2-parameter function that does exactly what you want. It creates a single record for every subfield separated by a specific delimiter.

For instance:

LOAD subfield(ListBoxField, ',') AS SingleValue

RESIDENT ListBoxFieldTable;

will serialize alle values from your example into a list of individual records. A subsequent list box will skip the doubles.

Peter

rustyfishbones
Master II
Master II

Hi,

Please see the attached file, I hope it helps

Not applicable
Author

Brilliant, thanks all! Works a treat.