Sorting the groups/colours in stacked bar chart

Hello team,

In Quick, I created a vertical stacked bar chart with Year on the X-axis, having a measure in the values section and Ethnicity Group in the legend/color field. I need to manually arrange the Ethnicity Group in a custom order instead of the default ascending or descending order.

However, I cannot find a “Sort By” option for the legend/color field - the sorting option is available only for the X-axis field. Is there any way to do this? I have attached the screenshot below.

Hi @Kripa,
If you change up the field to use an off visual field (but use your group/color), does that not give you the outcome you’re looking for?

If not, I assume that the values within each bar are being sorted alphabetically? Do you want them in the same order for each bar? While not an ideal work around, you could build an ifelse that assigns a number to each value and then you can create the order you’d like to have through that. You may have to create a separate legend as well (could use a table) so that you can show which colors equal each value.

Hi @Kripa,

Hope everything is well with you! Just checking back in since this thread hasn’t received a response in a while. Was Brett’s reply helpful to you or were you able to find a solution yourself in the meantime? Please help the community by marking this answer as “Solution” or following up in general within the next 3 business days!

Hi @Kripa,

Since I haven’t received any further updates from you, I’ll treat this inquiry as complete at this time. Please feel free to create a new post if you have more questions.

Thank you.