Change the order of values in legend

By default, Sigma sorts the values in a legend alphabetically but that is not always ideal.

The ability to be able to change this order manually or based on some value in the back end would be helpful.

It is pretty commonly used when we want to showcase a legend on a map and the legend values are tags about how that region is performing such as - Very Good, Good, Neutral, Bad, Very Bad.


Would love this capability. I’ve had a feature request open for this for almost a full year though and so far no progress. Maybe this will put it on their radar

In certain circumstances, you can use a hack to achieve this. You create a new column, and use the SWITCH function to assign a number to each of your items in the order you want. In your example - Very Good, Good, Neutral, Bad, Very Bad - you could assign the values 1,2,3,4,5 in that order. Then when you create your chart, you might be able to use your new column to Sort the chart.

Example of mine below.
First pic shows how Sigma sorts the legend by default, custom date ranges that I have are being sorted by alphanumeric which isn’t helpful (i.e. it puts 1-2 years before 3-6 months).

Second pic shows if I add a Custom Sort (using the new Sort column I created) on the category, it will base the order on my new column.

Obviously if you have a lot of items, writing out an entire SWITCH function could be cumbersome.

1 Like