Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER 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
Master II
Master II

Hi,

Please see the attached file, I hope it helps

View solution in original post

6 Replies
MVP
MVP

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

Specialist II
Specialist II

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

Master II
Master II

try using the SUBFIELD()

something like

2014-01-23_1452.png

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

Master II
Master II

Hi,

Please see the attached file, I hope it helps

View solution in original post

Not applicable

Brilliant, thanks all! Works a treat.