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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Custom sort list box

Hi,

I'm trying to sort a list box by expression in order to show the data in a certain way.For example if I want a list of names to appear in this order: Kevin, Alex, Zuri, Daniel, Monica, Betty.

Labels (1)
4 Replies
Anonymous
Not applicable
Author

In the sort by select expression. An example is the following where

* fieldname is field you are sorting

=Pick(Match([FieldName],'Kevin','Alex','Zuri', 'Daniel', 'Monica', 'Betty')

     ,1,2,3,4,5,6

)

jagan
Partner - Champion III
Partner - Champion III


Hi,

Add this script in your Qlikview file

NamesOrder:

LOAD * INLINE [

Name, NameSortOrder

Kevin, 1

Alex, 2

Zuri, 3

Daniel,4

Monica,5

Betty, 6 ];

Now in the sort tab of the Properties select expression and give

=NameSortOrder

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thanks for your help

Clever_Anjos
Support
Support

another way

=Index('Kevin,Alex,Zuri,Daniel,Monica,Betty',[FieldName])