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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jleberre
Contributor II
Contributor II

Coloring by dimension and ordering legend

Hello

In a bar chart, I order dimension using expression like this : if(Match(mydimension,'US'),1,if(Match(mydimension,'FR'),2, ...))

It works fine.

But when I configure color by dimension using 'mydimension', the different values of mydimension are listed in alphabetical order, and no more using expression.

Any idea to resolve this problem?

Thanks!

1 Reply
jleberre
Contributor II
Contributor II
Author

I finally resolved my problem using Dual(text,number) function

My field has  now 2 values: a string value for display purposes, and a number value for sorting purposes

Dimension is ordered by number instead of by expression