Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked bar chart – how to restrict the number of segments & maintain alphabetical sorting.

Hi all.

I have a stacked bar chart. I want to restrict each bar to just 5 segments, which should be the top 5 most common values. However the bar segments must appear in ascending sort order (alphabetically A-Z).

If I sort the chart by ValueDescription (A-Z) then the first 5 values are returned alphabetically, not the most common.

If I sort the chart by count(distinct EpisodeID) descending then the 5 most common values are returned, however they appear in the wrong order. Which renders my graph useless.

Any suggestions?

Is it possible to base the bar chart on a straight table? I could then apply the top 5 restriction to the table and maintain the sorting in the bar chart.

Thanks in advance, Michael.

0 Replies