Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jood_ahmad
Creator II
Creator II

split a column

Dears,

if i have in one var-char column these value

( -059;+308;+SFCRF0012;601;+671;671;024;023;043;061;033;059 )

( -664;-664;-664;101;+636;671;664;047;@101 )

( +204;601;671 )

and i need to split it to columns as per the number value after each ( ; ) as a new column  is this possible in QV .

1 Solution

Accepted Solutions
pipuindia99
Creator III
Creator III

SubField(fieldname,'.','1') and in next expression SubField(fieldname,'.','2') .....

View solution in original post

21 Replies
pipuindia99
Creator III
Creator III

Yes, you can use subfield function

jood_ahmad
Creator II
Creator II
Author

but Subfield wil not work on this case. i need all the values but in separate columns. subfield will take one value as per the position.

pipuindia99
Creator III
Creator III

use the subfield function by adding a expression and give this fieldname. it should work

sunny_talwar

I think this is what pipuindia99‌ is trying to say

Table:

LOAD *,

  SubField(FieldName, ';') as NewFieldName;

LOAD * Inline [

FieldName

-059;+308;+SFCRF0012;601;+671;671;024;023;043;061;033;059

-664;-664;-664;101;+636;671;664;047;@101

+204;601;671

];

Capture.PNG

pipuindia99
Creator III
Creator III

Yes, but to get all we can give frequency for each

sunny_talwar

Like this?

Capture.PNG

Table:

LOAD *,

  SubStringCount(FieldName, NewFieldName) as Frequency;

LOAD *,

  SubField(FieldName, ';') as NewFieldName;

LOAD * Inline [

FieldName

-059;+308;+SFCRF0012;601;+671;671;024;023;043;061;033;059

-664;-664;-664;101;+636;671;664;047;@101

+204;601;671

];

pipuindia99
Creator III
Creator III

SubField(fieldname,'.','1') and in next expression SubField(fieldname,'.','2') .....

pipuindia99
Creator III
Creator III

SubField(fieldname,';','1') and in next expression SubField(fieldname,';','2') .....

pipuindia99
Creator III
Creator III

so each values would be in different columns...