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: 
mambi
Creator III
Creator III

stacked bar chart sort order

Hi everyone,

in the chart below i've 2 dimensions : 1st : Category,  2nd Product and 1 expression : sum(Qt) / sum( total <Category> Qt)

i'm trying to sort products in each bar by descending order of Qt , so in the sort tab i used this expression : sum(Qt) / sum( total <Category> Qt)  but it's doesn't work.

(the category order is not important)

any idea?


6 Replies
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

it is better if you upload the document. Maybe you could try to sort using only sum(Qt)

Anonymous
Not applicable

Well, it is in fact sorted by the descending order - but in total rather than per Category.  It maybe possible to have different sort order per Category.  As Michele Barini says, upload your file.

mambi
Creator III
Creator III
Author

here's an exemple :

as you can see the 2nd,3rd ... bars are not well ordered

also i want to use persistent colors option

hic
Former Employee
Former Employee

The sort order is calculated globally for the chart. Since the product 'SCG' is ranked 2nd on a global level, it will be the 2nd product in all categories.

There is unfortunately no simple way to have different sort orders for the different categories. Maybe it can be done using Aggr(Rank(Sum(...))) as calculated dimension, and then sorted according to this. I haven't tried it though...

HIC

mambi
Creator III
Creator III
Author

thanks for your time

Anonymous
Not applicable

I tried this and other similar but didn't find a solution.