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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
alexquimu
Partner - Contributor III
Partner - Contributor III

Sorting legend in a bar graph - Qlik Sense Enterprise May 2024

 

Hello everyone,

I am experiencing a sorting issue with the legend of a bar graph that has two dimensions and one measure. I have specific sorting orders for both dimensions, and I have stored these fields as dual values to facilitate the sorting process.

While both dimensions are sorted correctly in the graph, the legend does not reflect this sorting order. For example, the order for the Countries should be A -> B -> C, as indicated in the second table. However, since there is no Spain in the first value of the Client dimension (Client A), it appears first in the legend.

I would like the legend to follow the sorting order defined in the dual values for the Country field.

 

alexquimu_5-1743505932578.png

 

 

Of course, if I filter by client C, as this has all values of the Country, the legend will be sortered correctly.

Has anyone encountered this issue or have any suggestions on how to ensure that the legend matches the sorting of the dimensions? Any help would be greatly appreciated!

Find attached the .qvf.

Note: I am currently using Qlik Sense Enterprise version May 2024, though it didn't work with previous versions such as Feb 2022.

Labels (5)
2 Replies
Clement15
Partner - Specialist
Partner - Specialist

Hello,

The only workaround I've found is to create zero values ​​for all countries and all customers using a Cartesian product. And to include the zero values.
But this is difficult to implement because you'll have a large number of bars equal to zero in your chart.

 

Clement15_0-1743513160937.png

 

alexquimu
Partner - Contributor III
Partner - Contributor III
Author

Hello,

 

That's an intelligent approach. However, the real dimensions contain more than three categories, resulting in a lot of blank spaces. Anyway, thank you so much for your time and speed.

 

Greetings,

Alex