Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ricardodeano
Contributor II
Contributor II

Sort by, then by expression

Good afternoon

Quick question for you, I currently have a simple custom sort by expression that is as follows:

=%DisplayOrder

How would I go about putting in another field and then ordering them independently?

For example, in my head, I would like to do the following custom sort by expression:

=Section DESC THEN BY %DisplayOrder ASC

Is this possible (please note, I am aware the above syntax does not work 🙂 )

Rich

 

Labels (1)
2 Replies
dwforest
Specialist II
Specialist II

In script,

ORDER BY Section DESC, %DisplayOrder

In visualization, maybe making a key. Depends on the value of Section, if numeric, its easy\

key=Hash128(-Section,%DisplayOrder)

If string, you'd have to somehow get the reverse of the String sort order, may a map substituion....

ricardodeano
Contributor II
Contributor II
Author

Hello dwforest

I completely forgot to say thank you for this reply, I'm sorry about that!

I ended up creating my own key during the loading of my data which did the job. Thanks for the pointer.