Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
rmmetcalf
New Contributor III

Sorting the stack in a stacked bar chart in Qlik Sense

I have a stacked bar chart of employees and percentage of products they've sold.  The bars are the employees sorted in alphabetical order.  How do I sort the stacks in the bar by percentage each product was sold?

I have found solutions for this in Qlik View, but I need the solution for Qlik Sense.

1 Solution

Accepted Solutions
shubham_singh
Contributor II

Re: Sorting the stack in a stacked bar chart in Qlik Sense

Unfortunately this is not possible.

Whatever sorting you use for 2nd dimension, it will be evaluated in overall level irrespective of 1st dimension.

And stacks in every bar will be sorted according to that.

8 Replies
OmarBenSalem
Esteemed Contributor

Re: Sorting the stack in a stacked bar chart in Qlik Sense

under the sort tab; put yur measure ABOVE the dimension

rmmetcalf
New Contributor III

Re: Sorting the stack in a stacked bar chart in Qlik Sense

The order under the sort tab is:

Employee

Percentage Sold

Product

In addition, I have sorted by expression where the expression is percentage sold.

The stacks in the bars are still not sorted.  :-(

yujiyamane
Contributor II

Re: Sorting the stack in a stacked bar chart in Qlik Sense

Hi Ryan,

Below can be the solution.

Go to Sorting > Product > Untick the Sorting Auto > Tick Sort by Expression > Add the same expression as your measure.

OmarBenSalem
Esteemed Contributor

Re: Sorting the stack in a stacked bar chart in Qlik Sense

drag the percentage ABOVE employees

shubham_singh
Contributor II

Re: Sorting the stack in a stacked bar chart in Qlik Sense

Unfortunately this is not possible.

Whatever sorting you use for 2nd dimension, it will be evaluated in overall level irrespective of 1st dimension.

And stacks in every bar will be sorted according to that.

rmmetcalf
New Contributor III

Re: Sorting the stack in a stacked bar chart in Qlik Sense

I can't.  Qlik Sense won't let me.

rmmetcalf
New Contributor III

Re: Sorting the stack in a stacked bar chart in Qlik Sense

I did that.  It doesn't sort the stacks.

balabhaskarqlik
Honored Contributor

Re: Sorting the stack in a stacked bar chart in Qlik Sense

May be modify script like this, use it:

Sports:

CrossTable (sports, followers,1)

load * inline

[

country, cricket, football, hockey

india, 3000000, 2000000, 900000

australia, 2000000, 1500000, 400000

south africa, 1500000, 1000000, 250000

];

stacked combo chart

1 dimension

country

3 Measures

Sum({1<sports={'cricket'}>}followers)

Sum({1<sports={'football'}>}followers)

Sum({1<sports={'hockey'}>}followers)