Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
omnomnom
Contributor
Contributor

Unconcatenate cell value

Hi everyone!

i have  field like this

<data><field id="1084"/><field id="1085">109</field><field id="1087">0</field><field id="1088">1</field></data>

how extract it to

IDVaule
1184null
11851109
11870
11881

?

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one possible solution:

QlikCommunity_Thread_133828_Pic1.JPG.jpg

tabInput:

LOAD *,

     RecNo() as RecNo

INLINE [

    field

    '<data><field id="1084"/><field id="1085">109</field><field id="1087">0</field><field id="1088">1</field></data>'

];

tabOutput:

LOAD RecNo,

     SubField(SubField, '"', 1) as ID,

     TextBetween(SubField, '>', '<', 1) as Value

Where SubField <> '<data>';

LOAD RecNo,

     SubField(field, '<field id="') as SubField

Resident tabInput;

hope this helps

regards

Marco

View solution in original post

1 Reply
MarcoWedel

Hi,

one possible solution:

QlikCommunity_Thread_133828_Pic1.JPG.jpg

tabInput:

LOAD *,

     RecNo() as RecNo

INLINE [

    field

    '<data><field id="1084"/><field id="1085">109</field><field id="1087">0</field><field id="1088">1</field></data>'

];

tabOutput:

LOAD RecNo,

     SubField(SubField, '"', 1) as ID,

     TextBetween(SubField, '>', '<', 1) as Value

Where SubField <> '<data>';

LOAD RecNo,

     SubField(field, '<field id="') as SubField

Resident tabInput;

hope this helps

regards

Marco