Forum Discussion
Adding Extra Fields to Sort Menu
- 1 year ago
Hi Anonymous ,
You're definitely running into a known limitation of the Gantt visual — it only allows sorting by fields that are used in specific roles and interpreted as measures.
Here’s a workaround that might help:
Create a measure version of your calculated column, like:
MySortMeasure = MAX('YourTable'[YourCalculatedColumn])This forces it into a measure context, which the visual can recognize for sorting.
Place that measure into the % Completion field (since you’ve disabled its default behavior). This will make it appear in the sort menu via the three dots.
Unfortunately, as you mentioned, the % Completion role only accepts one field at a time. If you want to switch between multiple sort fields dynamically, you can use a disconnected table and a slicer to control which measure is active — a technique known as dynamic sorting.
Here are some helpful Microsoft docs that explain sorting behavior in Power BI:
- Change how a chart is sorted in a report: https://learn.microsoft.com/en-us/power-bi/consumer/end-user-change-sort
- Sort one column by another column: https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column
- Sorting options for custom visuals: https://learn.microsoft.com/en-us/power-bi/developer/visuals/sort-options
Let me know if you’d like help setting up the dynamic sort logic — happy to walk you through it.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
This is a shortcoming in PBI that I have been giving feedback on for the last 5 years that I have been using it. BusObj could sort on as many columns or rows as were in the matrix (crosstab) 20 years ago and it's stil not available in PBI. Seems like a basic function that is missing.