I have a stacked line chart showing numbers (Sum
) on the y-axis plotted against dates (Split_part
) on the x-axis, with these numbers grouped by category (Budget
) into different colours. There are more than 25 categories, and so large numbers of the categories are grouped together by QuickSight in the “Other” category/colour. You can see an example of this here:
However currently the categories are being ordered alphabetically, and the “Other” category just includes all categories after the 25th category alphabetically; this means many trivial categories are shown with their own colour, while many larger categories are grouped into “Other”. I would instead like the categories to be ordered by their total Sum
, so the 25 biggest categories will be shown on the chart, and everything after these will be in the “Other” category - i.e. to minimize the overall size of the “Other” category - is this possible?
I think I could work around this by renaming the categories by size in my query, so these will be named like 001 - largest budget
, 002 - second largest budget
etc, so alphabetical ordering would become equivalent to size ordering - but would rather avoid this if possible, if there’s a better way.