Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
mambi
Contributor 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?


Tags (1)
6 Replies
bbi_mba_76
Valued Contributor

Re: stacked bar chart sort order

Hi,

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

mov
Esteemed Contributor III

Re: stacked bar chart sort order

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
Contributor III

Re: Re: stacked bar chart sort order

here's an exemple :

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

also i want to use persistent colors option

Employee
Employee

Re: stacked bar chart sort order

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
Contributor III

Re: stacked bar chart sort order

thanks for your time

mov
Esteemed Contributor III

Re: stacked bar chart sort order

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

Community Browser