Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! I am trying to sort a legend in a bar chart by descending year, and currently the order is not correct. For the year, it is extracted from a field called Move.Date which is formatted as "MM/DD/YYYY" so for example "01/09/2023". I extracted it by setting under Field: "=Year([Move.Date])". I am fairly new to Qlik so any help would be appreciated!
first sort by "Description" as alphabetically
second sort by Year as number
legend color set to "By Dimension" by Year
Hi @agardoge check if this configuration works, when you have to order by a specific field, let the other fields order by load
@QFabian thanks for the suggestion. So my bar chart, under each bin called "Description", there is a value based on the year. So for example, the number of Apples collected in 2019 through 2023 is shown then the number of oranges, etc. So I would like to still sort the bins alphabetically - in the below picture, showing 8L then 12L then 30L then 33L, etc. Is there a way to do this? Because using your suggestion, it fixes the legend but then the bin order changes.
Hi @agardoge , please check if this works for you :
With 'Automatic' in Colors :
With Custom Colors and By Dimension:
@QFabian It's getting closer, thanks for the suggestion! The only issue that is left is that while the legend is now sorted and the correct order of the bins is there, the years that were added to the X-axis are not in order. Is there a way to order the bars? So far, I sorted the "Description" to sort alphabetically, Year is Automatic, and for the legend the color is set to "By Dimension".
first sort by "Description" as alphabetically
second sort by Year as number
legend color set to "By Dimension" by Year
@QFabian When I try the above, using the sort for the Year as a number, it only changed a few of them but I had to also remove all sorting from Count(Description).
UPDATE:
When I uncheck "Include Null Values" and set sort for Year to "Auto" it partially fixes it for some of the bins but not others.
@agardoge could be seems to be not ordered because there is no data for every Descripcion/Year, so there are less columns in some cases