Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rxp03570
New Contributor III

Sorting Order Help

I am trying to sort and place a specific to the last.

Ex:

Load * inline [

Sort

Alpha,

Beta,

Charlie,

Tango,

.

.

.

.

Delta

];

I want the Charlie field to sort at last.

How can I sort this??

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Sorting Order Help

Try this sort expression

=If(Only({1}Sort) = 'Charlie', Rank(Only({1}Sort)), -Rank(Only({1}Sort)))

6 Replies
MVP
MVP

Re: Sorting Order Help

Sort on the front end or the script?

rxp03570
New Contributor III

Re: Sorting Order Help

Requirement is on the front end.

Can you please give the answer for both.

Highlighted
MVP
MVP

Re: Sorting Order Help

rxp03570
New Contributor III

Re: Sorting Order Help

Tried doing that, but I do have many fields. Do I have to have all the fields in the match function, Don't we have any straight solution.

Thanks

Rahul

MVP
MVP

Re: Sorting Order Help

Try this sort expression

=If(Only({1}Sort) = 'Charlie', Rank(Only({1}Sort)), -Rank(Only({1}Sort)))

rxp03570
New Contributor III

Re: Sorting Order Help

Thanks Sunny