Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Adding Extra Fields to Sort Menu

Hi, I am using Microsoft's Gantt chart. The chart automatically allows me to sort by task name and earliest end date. However, I have two calculated columns that I would also like to sort by. If I...
  • burakkaragoz's avatar
    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:

    1. 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.

    2. 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:

    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.