Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change the sort order in the way you want?

hi, QlikView community

I have a small problem that is not difficult to figure out.

But I have not figure it out yet.

Usually I want sort order to be in numeric value order or something similar.

But now I want to the sort order to be same no matter what.

How can I do that?

1 Solution

Accepted Solutions
satishkurra
Specialist II
Specialist II

Hi

Please follow the below order of script for CUSTOM SORT.

Temp:

LOAD * Inline [

Category

Meat

Fish

Chicken

];

Data:

LOAD * INLINE [

Category,Sales

Fish,100

Meat,200

Chicken,450

];

DROP Table Temp;

Note:

Reload the script. Modify the properties of the Category list box and on the Sort tab,

set the Sort by option to Load Order.

View solution in original post

9 Replies
Not applicable
Author

what do you mean you want it to be the same no matter hat?

Anonymous
Not applicable
Author

I mean let say for example I have

Category               Sales

Fish                       100

Meat                      200

Chicken                  450

In qlikview I can have different sort order.

But I want have the order first Meat, second Fish and then Chicken

and I want that order to be same no matter what

Not applicable
Author

i you always want it like this you have to load in you table in that order and then use the last possible sort method. i dont know what it is called in english but it should be something like load order

hope this helps.

regards,

MT

Anonymous
Not applicable
Author

is it only possible to this in the script?

I can't do it in the chart properties -> sort?

satishkurra
Specialist II
Specialist II

Hi

Please follow the below order of script for CUSTOM SORT.

Temp:

LOAD * Inline [

Category

Meat

Fish

Chicken

];

Data:

LOAD * INLINE [

Category,Sales

Fish,100

Meat,200

Chicken,450

];

DROP Table Temp;

Note:

Reload the script. Modify the properties of the Category list box and on the Sort tab,

set the Sort by option to Load Order.

Not applicable
Author

yes you do this in the chart properties -> sord -> load order

the only think you have to do in your script is you have to change the order how you load you data.

regards,

MT

tresesco
MVP
MVP

Create an Inline load like:

Load

     Category,

      Autonumber() as SortOrder

Inline [

Category

Meat

Fish

Chicken

....

];  /// your desired order

Now use this SortOrder field in the osrt tab.

vipin_mishra479
Creator II
Creator II

Hi Darri,

use this in sort tab expression

WildMatch(Category,'Meat','Fish','Chicken')

regards,

vipin

Anonymous
Not applicable
Author

In Chart Properties Sort Tab

set to sort by Option to Load Order.