Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
svsudhakar
Creator
Creator

Sorting Problem

Hi,

I need help on the below customized sorting Order.

I have the data like this

RId  Region

1      AAA    

2      BBB    

3      CCC

4     DDD

the transaction data is like this

Region val

AAA     50

BBB     100

CCC     200

But I want the output like below Order .

Region val

BBB     100

AAA     50

CCC     200

DDD     0

7 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use sort expression like this:

     =Match(Region, 'BBB', 'AAA', 'CCC', 'DDD')

You could also preload them to set the load order, or use dual value and sort by number

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MarcoWedel

Sorting expression:

=Match(Region, 'BBB', 'AAA', 'CCC', 'DDD')

alexandros17
Partner - Champion III
Partner - Champion III

Load a table (with load * inline and for each region associate a number, then use that number to sort ...

load * inline [

Region, SortOrder

BBB,1

AAA,2

CCC,3

DDD,4

];

Use SortOrder in the expression sorting of your chart

let me know

rajeshvaswani77
Specialist III
Specialist III

Hi,

Left join the second table to first one.

Then have a dimension region and expression sum(

thanks,

Rajesh Vaswani

svsudhakar
Creator
Creator
Author

Hi ales,

I Created the Sort Order and given the sorting based on this field but here the problem is I don't have any transaction data for Region DDD ,even though I want to show in the output with 0 val.

because of this the DDD region sorting value not coming in my application.

alexandros17
Partner - Champion III
Partner - Champion III

So you mean that your expression will not retrieve any data for DDD Region?

In this case DDD will not appear in your chart ... if you want it to be displayed use show all data in dimension tab

svsudhakar
Creator
Creator
Author


Hi Alen,

Thanks for Your reply,

I have selected the show all data check box in dimension .now all the Regions are appearing but Sorting is not Working. Because there is no Associated data for DDD region