I don’t think you can apply custom sorting to Group/Color. In a vertical bar chart you can only do it on the x-axis and in a horizontal bar chart you can do it on the y-axis.
For example, to apply custom sorting to the y-axis, select “Sort options”.
@jotg
Can you try to edit your calculated field and instead of using 1, 2, 3, 4, 5, 6, using ‘1: 0’, ‘2: 1-4’, ‘3: 5-15’, ‘4: 16-20’, ‘5: 21-42’, ‘6: Missing’, ‘else’?
This way the legend labels would be
1: 0
2: 1-4
3: 5-15
4: 16-20
5: 21-42
6: Missing
Thanks David. I could see that. This is quite frustrating as things like this are so easy to do in PowerBi. The NIHSS scores are an indication of stroke severity, so it would be good for a hospital to see how many admissions they had in each category per month as more severe strokes require more resources. I’m not sure how else to display this.
The issue is with the 0 at the end. You’re creating this field as a string, so you can’t assign a 0. Either all values should be a string or all values should be a number. You can’t mix string values and numbers. You can change the 0 to null or if you really want 0, you can assign it as a string by putting it in quotes.
There is a hacky possibility of achieving your own sorting in visualizations that do not support custom sorting. You can add empty spaces before your values and use classic alphabetical sorting. QS will use leading whitespaces for sorting, but it does not display them. Keep in mind QS may change this functionality at any time.
Thanks.
My understanding of QS is still very basic, so I’ll have to work out what a string is and then take it from there.
Thanks again for all of your help.