Hi Team,
I am facing an issue with sorting values in a filter field in Quick Sight.
For example, I have a field called CATEGORY_GROUP_ID_NAME which contains values like this:
Currently showing in Quick Sight (incorrect sort order):
1-RETAIL
11-MEDIUM TRUCK PARTS
12-TURF/TRAILER
2-TRUCK
20-MISC/OTHER
21-USED TIRES
22-SCRAP TIRE DISPOSAL
23-FOAM FILL/PRESSING
24-OTR PARTS
3-OTR
4-INDUSTRIAL
5-AG/FORESTRY
6-BANDAG RETREADS, REPAIRS & CASINGS
7-OTR RETREADS & REPAIRS
8-BILLED LABOR
9-MECHANICAL PARTS
But I want the filter values to appear in proper numeric order, like this:
1-RETAIL
2-TRUCK
3-OTR
4-INDUSTRIAL
5-AG/FORESTRY
6-BANDAG RETREADS, REPAIRS & CASINGS
7-OTR RETREADS & REPAIRS
8-BILLED LABOR
9-MECHANICAL PARTS
11-MEDIUM TRUCK PARTS
12-TURF/TRAILER
20-MISC/OTHER
21-USED TIRES
22-SCRAP TIRE DISPOSAL
23-FOAM FILL/PRESSING
24-OTR PARTS
As you can see, Quick Sight is currently sorting these values as text (lexicographic order) instead of numeric order, which puts 11 and 12 before 2 and 3.
We tried multiple approaches like calculated fields (splitting the number prefix and casting to integer), but haven’t found a proper solution for sorting filter values this way.
Could you please suggest how we can achieve this kind of numeric-aware sorting in Quick Sight filters?
Thanks in advance!
