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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lbrosten
Contributor III
Contributor III

Set legend and bar chart order other than alpha or numeric.

My bar chart is made up of High, Med and Low. I want the bars to sort top to bottom, High (Light Blue), Med (Red),  Low (Blue) and the Legend order to be high, med, low.  Sort by Number or Alpha doesn't work. If it is expression what would expression be?

lbrosten_0-1643051248311.png

 

Labels (2)
1 Reply
chaorenzhu
Creator II
Creator II

use dual() for your legend field in your load script, something like if ("Contact Method"='High',dual('High',1), if ("Contact Method"='Medium',dual('Medium',2),dual('Low',3))) as "Contact Method"