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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
qliker3
Creator
Creator

Sorting

Hi,

i have data that goes from 0 to 10. I want to create a filter pane that would start at 3 and go to 2. Example: 

0 1 2 3 4 5 6 7 8 9 -> 3 4 5 6 7 8 9 0 1 2

how would i do this? 

Thanks

 

 

Labels (1)
7 Replies
marcus_sommer

You may apply a conditional function for the sorting like:

pick(match(Field, 3 4 5 6 7 8 9 0 1 2), 0 1 2 3 4 5 6 7 8 9) // with commas instead spaces as value-delimiter

Another method would be to pre-load your values, like:

temp: load * inline [
Field
3
4
...];

then loading your origin data and after it removing the temp-table again. Now you could use the load-order for the sorting.

- Marcus

qliker3
Creator
Creator
Author

it has set the sorting to 0 1 2 3 4 5 6 7 8 9 instead of 3 4 5 6 7 8 9 0 1 2. How can this be fixed? 

marcus_sommer

The load-approach like suggested should work but the expression has a logical error because the pick() isn't set right respectively wouldn't be needed for this scenario. Therefore change it to:

match(Field, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2)

- Marcus 

qliker3
Creator
Creator
Author

so my actual sorting is from 0 to 24. And after applying your recent coment i get a weird sorting order: 

qliker3_0-1668156497756.png

Regards 

marcus_sommer

If the range of numbers is different you will need to adapt the sorting-measures appropriate. Further you need to ensure that this sorting is also applied as the first sorting-option.

- Marcus

qliker3
Creator
Creator
Author

i have set this column as the first sorting option. It works better now but for some reason 10 is on top, everything else is set to the right sorting order 

qliker3_0-1668157820913.png

Regards

marcus_sommer

This looked like a normal numerical sorting and not like a customized one. Are you sure that you have set the sorting to the expression (and before also checked that the expression is logically and syntactically working because an invalid expression will be ignored)? If you have chosen to apply the sorting per load-order then this option needs to enabled.

- Marcus