Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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!

3 Replies

Re: Sorting Key

May be a sort expression like this

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

Re: Sorting Key

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') )


Re: Sorting Key

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

Community Browser