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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
vish123
Creator III
Creator III

How to create combinations of cell values separated by delimiter in Qlik

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.

vish123_0-1636029698241.png

 

Please suggest how can i achieve this in Qlik.

 

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

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;

View solution in original post

2 Replies
rubenmarin

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;
vish123
Creator III
Creator III
Author

Hi ,

Thanks a ton:) .. its working as expected.