Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
YoussefBelloum
Champion
Champion

Concat distinct with sorting

Hi guys,

I need to get field (INDIC_3) values on textboxes, with the same sorting as the loading sort, using concat and then subfield.

here is what I get:

screen1.png

the green color represent the loading sort wich is correct, and the red color represent what I get with Concat(Distinct INDIC_3)

I tried to read all the threads about the same issue, so I tried using the third parameter of the Concat() with RowNo on the script and on the front end. nothing is working for me

PFA the sample data I'm using for this example

Thank you for your help

1 Solution

Accepted Solutions
MayilVahanan

HI @YoussefBelloum 

Try like below

LOAD INDIC_NIV_0,
INDIC_1,
INDIC_2,
INDIC_3,
INDIC_N2,
AutoNumber(INDIC_3) as INDIC_3No
FROM
[D:\Qlik\Com\test.xlsx]
(ooxml, embedded labels, table is Feuil1);

Front end: Text box:

=Concat(DISTINCT INDIC_3, ',', INDIC_3No)

MayilVahanan_0-1619071139556.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
edwin
Master II
Master II

concat function does have sorting option:

Concat - script function ‒ QlikView

 

MayilVahanan

HI @YoussefBelloum 

Try like below

LOAD INDIC_NIV_0,
INDIC_1,
INDIC_2,
INDIC_3,
INDIC_N2,
AutoNumber(INDIC_3) as INDIC_3No
FROM
[D:\Qlik\Com\test.xlsx]
(ooxml, embedded labels, table is Feuil1);

Front end: Text box:

=Concat(DISTINCT INDIC_3, ',', INDIC_3No)

MayilVahanan_0-1619071139556.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Frank_Hartmann
Master II
Master II

if you want to do it without changing the script you could do as following:

=concat(distinct INDIC_3,',',match(ord(left(subfield(INDIC_3,' ',3),1))-64,'1','33','5','13'))

YoussefBelloum
Champion
Champion
Author

@MayilVahanan thank you ! it works