Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sort the Dimensions dynamically

hi,

I have a dimension named empname and values in expression.

empname    values

     ram          100

     par           300

     peter          50

     steven      120

     bass          30

I need to display the empnames as follows.

empname     values

   steven          120

   bass              30

   peter              50

   ram              100

   par               300

obviously i cant sort the names as above using sort tab in any of the objects, How do i display the above , (i.e) i have to sort those names dynamically. Need your help

Thanks

1 Solution

Accepted Solutions
marcus_sommer

If you didn#T want an aplhanumeric sorting you need to define your sort-order within the script - to adjust the load-order or with an additionally sort-table - or you could use a sorting expression within the object like:

pick(match(empname, 'steven', 'bass', ...), 1, 2, ...)

- Marcus

View solution in original post

2 Replies
marcus_sommer

If you didn#T want an aplhanumeric sorting you need to define your sort-order within the script - to adjust the load-order or with an additionally sort-table - or you could use a sorting expression within the object like:

pick(match(empname, 'steven', 'bass', ...), 1, 2, ...)

- Marcus

Anonymous
Not applicable
Author

Thank you. I used in a sorting expression in an object. It worked.