Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
adamgaox
Creator
Creator

Qlik Sense Stacked Chart Legend Sort Issues

Hi Guys,

I notice there's an issue when displaying by stacked chart.

  1. Description for the issue.
    Legend sort will be assigned the end even set the sort by using field when the calculated value IS NULL in first row.
  2. My sample qvf file data structure
  3. My sample qvf file scripts
    refer to the qvf uploaded file
  4. Solution I suppose and what else solution I want.

        the possible solution I thought is to filling the data in the fact table with 0 combine to all the possible dimension values combination.

        but I think this would be digusting when the fact table is huge and when the etl loic is complicated in projects.

        What I want to find if there's a way to sort the legend in front end or any other easier ways not to modify the fact table?

Thanks all in advance!


4 Replies
Anonymous
Not applicable

Hi Adam, how do you create a stacked bar chart in Qlik Sense?

rangam_s
Creator II
Creator II

Update the sorting as below in below the tables so that it will show in same order in both.

Sorting.png

adamgaox
Creator
Creator
Author

Hi Nazif,

There's an option when you acitvate the bar chart and in the appearance option there're 4 options for bar chart which are grouped\stacked\vertical or horizon

adamgaox
Creator
Creator
Author

Hi Rangam,

sorry for the delay of replying your message.

I need to declare more infor here.

What the sort I want is to display

Banana,Apple,Custard Apple.

I apply the same option for both two stacked bar charts the only difference is the data.

Sort is defined in the qlik sense script.

Due to the data issue which in the first bar chart 2014 without Banana sales you will see the legend sort is

Apple,Custard Apple,Banana(This is not the correct sort)

But when Banana with 2014 Sales you will see the legend display correctly

Banana,Apple,Custard Apple