Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Splitting a field into multiple values in script

I have a column in a table containing strings of list of values separated by commas (e.g. "val1, val2, val3").

I would like to import the single values as if in a separate, related table.

So I could select from a field "val1" or "val2".

Is this possible?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Do you want one ROW for every value in the list? If so, you can use the subfield() function:

LOAD
"Something"
,"Something Else"
,subfield("My Concatenated Field",',') as "My Field"
FROM...
;

View solution in original post

4 Replies
Not applicable
Author

use right, left or mid clauses, accord of the position in the column.

left(val1,2)

right(val3,3)

mid(val2,2,3)



Not applicable
Author

Thank you Alfredo!

I'm sorry if I didn't explain well, but I can't. I don't know in advance the number of values, nor the number of them.

I could have a row "aaaa", another "bb, ccccc".

It really should be a 1-N relationship in the source db, but it isn't and I can't change that!

Thanks anyway for your fast response!

If you have any other thoughts, please let me know!

johnw
Champion III
Champion III

Do you want one ROW for every value in the list? If so, you can use the subfield() function:

LOAD
"Something"
,"Something Else"
,subfield("My Concatenated Field",',') as "My Field"
FROM...
;

Not applicable
Author

That's it!

Thank you John, you're the best!