GitHub user dosubot[bot] added a comment to the discussion: How to use pivot table sort data with column doesn't display in table?
<!-- Answer --> Superset pivot tables do not support sorting by a column that isn't displayed in the table. Sorting is only possible by columns or metrics that are visible in the pivot (i.e., included in the Rows, Columns, or Metrics sections). The common workaround is to add the column you want to sort by to the table, sort as needed, and then (if possible) hide it visually—but there is no built-in option to sort by a hidden column and then remove it from display. This limitation is confirmed in both the code and user discussions, and there are open requests for more flexible sorting options, but nothing is implemented yet [reference](https://github.com/apache/superset/discussions/32360). If you need more advanced sorting (like sorting by a hidden column), it would require custom code changes in files like `utilities.js` or `controlPanel.tsx` [reference](https://github.com/apache/superset/discussions/32360). Let me know if you want pointers on where to look in the code for this! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0665c2f6-3170-4fd9-81a2-3d5ce4bdcb36?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35276) GitHub link: https://github.com/apache/superset/discussions/35276#discussioncomment-14505064 ---- This is an automatically sent email for notifications@superset.apache.org. To unsubscribe, please send an email to: notifications-unsubscr...@superset.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org