Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adamgaox
Creator
Creator

QlikSense Appearance/Colors and legend/Colors custom option impacts legend sortings

Dear All,

I created a stack bar chart with time and product as dimensions.

I sorted the the stack bar by "Sort" field in the script and set the sorting option sort by "Sort" field in product dimension.

Since my product is over 12 products and I turn off the Appearance colors auto option then the "Sort" field not works.

Anybody know how to fix this issue?Thanks in advance.

Assign the sorting option in product dimension.

After disable Colors Auto option the legend sorts changed:

I've attached my qvf file.Thanks a lot.

Best Regards.

Adam.

Labels (1)
  • Chart

8 Replies
bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

I've read about this before and there it was noted that this is default for Qlik Sense. Have you tried to load the data in the specific order you want and then leave it all on "auto"?

Best,

Ali A

adamgaox
Creator
Creator
Author

No, I don't try that.You mean when loading the data in script and add order by in the script?

Best Regards.

Adam

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,

Yes that could be worth trying...you wouldn't have to have a "Sort" field and I think it would sort default both legend and sorting order.

Let us know how it goes.

Best,

Ali A

adamgaox
Creator
Creator
Author

I tried that way but it not works, actually from the result its auto sort rules is by product name from A-Z.

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,


Any way you can share some example data?

adamgaox
Creator
Creator
Author

Hi Ali,

Attached file above, thanks for your time.

Best Regards.

Adam.

bwisealiahmad
Partner - Specialist
Partner - Specialist

Hi,


Can't seem to get it to work. I tried with some ideas, but can't seem to sort that legend. Seems like that part isn't connected to the actual expression under the sorting.

😕

Best,

Ali A

balabhaskarqlik

Try expression like this, in Sorting by expression area:

=sum({<Salesvalues = {'$(=Max(Salesvalues))'}>}Product)/sum (total Time> Product)