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

Custom sorting

Hi,

I have this column that consists of the given set of values

Capture.PNG.png

I want it to be sorted as

0

1

2

3

4-7

8-15

16-30

31-60

60+

How to do this? Please help

3 Replies
yavoro
Partner - Contributor III
Partner - Contributor III

I would use match function, so your sort order condition should be something like:

match(columnName,'0','1','2','3','4-7','8-15','16-30','31-60','60+')

Give it a try

Cheers

Y.A.
MayilVahanan

HI

Try with dual function in script itself.

or

match(columnName,'0','1','2','3','4-7','8-15','16-30','31-60','60+') in sort expression

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

Use a dual, example below:

LOAD dual(F1,RowNo()) as F1 INLINE [

    F1

    0

    1

    2

    3

    4-7

    8-15

    16-30

    31-60

    60+

];