Skip to main content

New to Qlik Sense

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

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
wood
Contributor III
Contributor III

Split line in script

Hello everyone, how to write a script to turn T1 into T2. thanks.

t1:  

monlyvalues
201701AA
201702BB,CC

t2:

   

monlyvalues
201701AA
201702BB
201702CC
5 Replies
francescoreggia
Partner - Contributor III
Partner - Contributor III

Try

load

monly,

subfield(values,',') as values

resident t1;

wood
Contributor III
Contributor III
Author

good, thank you! 

ishanbhatt
Creator II
Creator II

Hi guiqiang,

For splitting the values in Qlik we have 'Subfield' function.


Subfield format:

Subfield (text, delimiter, field_no)

or

Subfield (FieldName, delimiter, field_no),

Now Let's talk about your table.

Subfield(Values,',',1) as Values

It is better to define field_no in the third parameter.

I have also attached example app. Hopefully, this will solve your problem.

wood
Contributor III
Contributor III
Author

I see, thank you very much.

ishanbhatt
Creator II
Creator II

Please mark as correct if you reach your solution.

Thanks.