Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sort order(urgent)

Hey Guys, i need an urgent help...........

i have a list box, in which i am showing some coloumn and i want to sort the values based on a sort order(Attaching data file for the reference). But, if i am sorting them on the basis of sort order, then the values which doesn't have data is shown at the bottom irrespective of the sort order(attahing image for the reference). How can i solve my problem?

6 Replies
Gysbert_Wassenaar

On the Sort tab unselect Sort by State


talk is cheap, supply exceeds demand
Not applicable
Author

I want my list box to look like this:

test.PNG

Not applicable
Author

Hey Gwassenar, i did that but there is no change in the sorting of the list box......

Anonymous
Not applicable
Author

I've not managed to replicate your image exactly, but assume the following:

1. you have all the data fields are selected ?

2. you are have ticked Expression and set up [sort order] as the expression

3. you have unticked the State sort order.

I've not managed to get it perfect either, but strangley have found that ticking Text with A->Z enables these excluded options to move from the end of the list (see attached). Not sure what is happening there.

Regards,

Jonathan

Not applicable
Author

Hey shivaraj.......i tried that too but it is not working.....

flipside
Partner - Specialist II
Partner - Specialist II

I have used the following approach to force bespoke sorting.

data:
load * inline [
Name, sort
PE,12
UNASGPRVC,0
BC,1
NATIONAL,-1
YT,2
NU,5
SK,6
NL,10
MB,7
NT,3
AB,4
ON,8
QC,9
NB,11
NS,13];

set delim = chr(39) & ',' & chr(39);

sortOrders:
LOAD
chr(39) & concat(Name,$(delim),sort) & chr(39) as NameSort
resident data;

vNameSort = peek('NameSort');

It basically creates a concatenated list and places it into a variable which you can then use in your sort list by checking only Expression =$(vNameSort).

flipside