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

Sorting numbers mixed with letters in multibox in numerical order

Hi

In my multibox I have numbers and numbers mixed with letters and now they are sorted like this:

1G

2G

3G

1

2

3

etc. and I want it to be like this:

1

1G

2

2G

3

3G

etc.

Any tips would be helpful, thanks!

/Felix

5 Replies
Not applicable

Hi Felix,

You can use Sort option here using formula as show below (Use Expression option)

If([Column_Name]='1',1, If([Column_Name]='1G',2, If([Column_Name]='2',3,If([Column_Name]='2G',4,If([Column_Name]='3',5),If([Column_Name]='3G',6))))))

Regards,

KC

marcus_sommer

Try something like this as sort-expression:

avg(keepchar(YourValue, '0123456789'))

But you should consider to make such sorting within the script.

- Marcus

swuehl
MVP
MVP

This should work as sort Expression:

=index(concat({1} TOTAL distinct YourField,'-'),YourField)

Anonymous
Not applicable

This also works:

sort expression =ord(FieldName)

combined with sort by text checkbox.

Samanehsorournejad

it works for me!