Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have a small requirement as below.
I have two columns with multiple values separated by delimiter. I need to create a combinations as below mentioned.
Please suggest how can i achieve this in Qlik.
Hi, this script can do the work:
OrigData:
LOAD * INLINE [
Column1 ;Column2
A,B ;C,D
](delimiter is ';');
// Intermediate table to get the differnt combinations
ProcessData:
NoConcatenate
LOAD
Column1,
Column2,
Subfield(Column1,',') as SplitColumn1,
Subfield(Column2,',') as SplitColumn2
Resident OrigData;
// Join the differnt rows created and add to the original table to create Column3
Left Join (OrigData)
LOAD
Column1,
Column2,
Concat(SplitColumn1 &','& SplitColumn2, '|') as Column3
Resident ProcessData
Group By Column1,Column2;
DROP Table ProcessData;
Hi, this script can do the work:
OrigData:
LOAD * INLINE [
Column1 ;Column2
A,B ;C,D
](delimiter is ';');
// Intermediate table to get the differnt combinations
ProcessData:
NoConcatenate
LOAD
Column1,
Column2,
Subfield(Column1,',') as SplitColumn1,
Subfield(Column2,',') as SplitColumn2
Resident OrigData;
// Join the differnt rows created and add to the original table to create Column3
Left Join (OrigData)
LOAD
Column1,
Column2,
Concat(SplitColumn1 &','& SplitColumn2, '|') as Column3
Resident ProcessData
Group By Column1,Column2;
DROP Table ProcessData;
Hi Rubenmarin,
Thanks a ton:) .. its working as expected.