Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
After applying sorting settings, the only visible effect is that bar segments' color changes
As 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...
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
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.
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