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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting Key

I want to change the order of my key by customizing it (i.e. Not ascending, descending by x or y value)

I have the following items in my one table ('Not Started', 'In Progress', 'In Review', 'Done', 'Onboarding Unsuccessful').  This is the order I would like them in. 


How would I write an expression to sort them in this way?

Thank you!

Labels (1)
3 Replies
sunny_talwar
MVP
MVP

May be a sort expression like this

Match(FieldName, 'Not Started', 'In Progress', 'In Review', 'Done', 'Onboarding Unsuccessful')

its_anandrjs
Champion III
Champion III

Maybe another one

Only( Match(FieldName, 'Not Started', 'In Progress', 'In Review', 'Done', 'Onboarding Unsuccessful') )


Or


Only( {1} Match(FieldName, 'Not Started', 'In Progress', 'In Review', 'Done', 'Onboarding Unsuccessful') )


MarcoWedel
MVP
MVP

Hi,

another solution might be to preload this field e.g. using an inline load and check the "sort by ... load order" option in the sorting tab of your chart properties:

QlikCommunity_Thread_275119_Pic1.JPG

QlikCommunity_Thread_275119_Pic2.JPG

tabSortStatus:

LOAD * INLINE [

    Status

    Not Started

    In Progress

    In Review

    Done

    Onboarding Unsuccessful

];

table1:

LOAD RecNo() as ID,

     Pick(Ceil(Rand()*5), 'Not Started', 'In Progress', 'In Review', 'Done', 'Onboarding Unsuccessful') as Status

AutoGenerate 100;

hope this helps

regards

Marco