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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
muniyandi
Creator III
Creator III

how to split the data into new record

Hi Team,

i have source table record like this

Source Records
"AA"-"AB"-"CC"-"DD"
"AM"-"AD"
"AH"-"AN"-"BL"

I need to load the data below mentioned format.

Expected Result
AA

AB

CC
DD
AM
AD
AH
AN
BL
Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

try this

Subfield(keepchar(Field,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-'),'-') as Result

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

May be try this:

PurgeChar(SubField(Source, '-'), Chr(34)) as Expected

sunny_talwar
MVP
MVP

For your sample:

Table:

LOAD *,

  PurgeChar(SubField([Source Records], '-'), Chr(34)) as Expected;

LOAD * INLINE [

    Source Records

    '"AA"-"AB"-"CC"-"DD"'

    '"AM"-"AD"'

    '"AH"-"AN"-"BL"'

];

Capture.PNG

muniyandi
Creator III
Creator III
Author

Thanks Sunny T

Some data have number also

"AH#2"-"AN#6"-"BL#8"



sunny_talwar
MVP
MVP

Would this be the output you would want to see?

Capture.PNG

Still using the same script:

Table:

LOAD *,

PurgeChar(SubField([Source Records], '-'), Chr(34)) as Expected;

LOAD * INLINE [

    Source Records

    '"AA"-"AB"-"CC"-"DD"'

    '"AM"-"AD"'

    '"AH"-"AN"-"BL"'

    '"AH#2"-"AN#6"-"BL#8"'

];

Kushal_Chawda
MVP
MVP

try this

Subfield(keepchar(Field,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-'),'-') as Result