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: 
googel84
Partner - Creator III
Partner - Creator III

Stacked bar chart sorting issue

Hi there, I am facing an issue concerning stacked bar chart sorting.

My bar chart has 2 dimensions (the most external one is actually a drill-down group) and one expression and both dimensions are sorted by the expression itself (in descending order). The external dimension is correctly sorted, while the internal one is not.

This is how the chart looks like before applying sorting settings to the most internal dimension.

Immagine2.png

After applying sorting settings, the only visible effect is that bar segments' color changes

Immagine.pngAs you can see segments' position within the bar remains the same.

I did a very similar thing on another chart in the same document and it works just fine...

3 Replies
Gysbert_Wassenaar

If the number of expense groups is smaller than 20 you can give every expense group its own color using a color expression like color(fieldindex('Expense group',[Expense group])). You can enter the expression by clicking on the + in front of the chart expression, selecting Background Color and then enter the color expression. If you have more than 20 expense groups you could load an extra table to define a color for each expense group. See this blog post for an example: Colors in charts


talk is cheap, supply exceeds demand
googel84
Partner - Creator III
Partner - Creator III
Author

The problem is not giving each Expense group a different color; it's sorting them within the bar.

I expected the bar to have the largest segment at the bottom and the thinnest segment at the top, as it happens in other very similar charts.

Thanks anyway.

Gysbert_Wassenaar

Hmm, well that is not something Qlikview does by default. If you managed it in another chart you either already know what to do or you got lucky with the data you loaded. Maybe this discussion helps: Bar Chart 2 Dimentions sorting


talk is cheap, supply exceeds demand