Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
michael_klix
Creator II
Creator II

dynamic sort order for expressions

Hello,

I have various measurements with a flag "high is good" and country as a dimension.

When presenting them in a bar chart, I want them to sort from "bad to good", meaning the worst are left and the better ones are to the right and potentially I have to scoll to see them.

As mentioned before, with the flag "high is good" altering, some need to be sorted ascending and some descending.

How can I make this depending on the flag?

Hope this was well explained.

Keep Qliking

Michael

11 Replies
michael_klix
Creator II
Creator II
Author

Hi Chanty

(and all who followed up later on the match option),

thanks for the reply(s). However I dont think that match would work as the available Country names (Dimension) are not known to me. In addition to be honest, I did not understand how match could help out here.

I dont want to open another question, but just to clarify the problem, here a draft table:

   

high is good10
countrykpi1kpi2
a9810
b959
c938
d927
e906

When displaying only one KPI in a bar chart, I want KPI1 to be sorted ascending and KPI2 to be sorted descending. So always the worst is left.

Proposed solution is to simply multiply a KPI with (-1) if the "high is good" flag is 0 and use ascending as default sorting order.

rgds

Michael

Chanty4u
MVP
MVP

cheers    you got the solution