Bug description
I'm testing the version 6.0.0-RC2. Sorting filter values by a metric doesn't work. Instead of sorting the values my the selected metric, it always sorts alphabetically. See the screenshots for comparison between version 4.1.1 and 6.0.0rc2 of the same filter on the same dashboard with the same setup (dark theme is the 6.0.0rc2).
Screenshots/recordings
Superset version
master / latest-dev
Python version
Not applicable
Node version
Not applicable
Browser
Chrome
Additional context
My data source is BigQuery (not sure if it makes a difference).
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
This is a confirmed regression: in Superset 6.0.0-RC2, select filter components always sorted values alphabetically in the frontend, even when a sort metric was specified, overriding the backend's metric-based sorting. This broke the expected behavior you saw in 4.1.1. The bug was fixed in pull request #35130 and pull request #35155, merged in September 2025. With these fixes, when you select a sort metric in the filter config, the frontend preserves the backend's metric-based order, and alphabetical sorting only applies if no metric is set.
To resolve this, upgrade to a build that includes these fixes (post-September 18, 2025). Sorting by metric should then work as expected, regardless of your data source (BigQuery or otherwise), since the logic is datasource-agnostic and handled in the frontend/backend communication.
Note: Sorting must be configured using the UI controls and the structured format; raw SQL strings for sorting are no longer supported in recent versions. If you need complex sorting, create a calculated column or metric first, then sort by that metric in the filter config. Details
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other