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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

CONCAT function sort issue

Hello QV developers,

I have column of text like this:

Col1
Text10
Text17
Text3
Text4
Text5
Text6
Text7
Text8
Text1
Text2
Text11
Text12
Text13
Text14
Text15
Text16
Text45
Text24
Text21
Text76
Text18

I am trying to use CONCAT function in the script like this so that I can get all text values in one cell.

LOAD

CONCAT(Col1, ';') As ConcatCol

RESIDENT

Test1

The result looks like this:

ConcatCol
Text1;Text10;Text11;Text12;Text13;Text14;Text15;Text16;Text17;Text17;Text18;Text2;Text21;Text24;Text3;Text4;Text45;Text5;Text6;Text7;Text76;Text8

This is not what I desire. The Text gets already sorted before the concatenation. I want the result in the same order as the rows appear in the first table like

This is what I desire

Text10;Text17;Text3;Text4 ...

How can I achieve this? Thanks for your help.

1 Solution

Accepted Solutions
Not applicable
Author

Problem Solved. I just realized we can have sort option as the third parameter inside the CONCAT function. So I am able to use the row number as the sort order. This works now. Thanks.

View solution in original post

1 Reply
Not applicable
Author

Problem Solved. I just realized we can have sort option as the third parameter inside the CONCAT function. So I am able to use the row number as the sort order. This works now. Thanks.