Dave_Gugg's avatar
Dave_Gugg
Icon for Kudo Collector rankKudo Collector
10 years ago
Status:
Needs Votes

Sort by another column in direct query

Currently you can choose to sort based on another column, such as sorting a month name by the month number. However, this option does not exist in direct query mode. Please extend this functionality to direct query mode.

9 Comments

  • I am all for this enhancement. In the meantime you have to build the field so it would sort correctly as an alpha field. For example day of week you would have to build the value like this: "10, 21 Fri", "10, 22 Sat", "10, 23 Sun", etc...
  • PBIuser01's avatar
    PBIuser01
    Frequent Visitor
    This functionality already exists. With a DirectQuery, in Report Mode, in the fields section, highlight the column to be used as the display value, such as 'Month'. Next Under the Modeling menu item, select 'Sort By Column'. Switch the sort by column to the column to be used, such as MonthNumber.
  • Resolved, was connecting to the power BI Service dataset that is connecting to on-premise SQL Server through DMG. So if I build a new report by connecting to the Power BI Service dataset, then this sort by column is disabled. So what I have done is to configure that in the Power BI Desktop that connect directly to the SQL Server, made the configuration in the data model and then re-publish into Power BI Service.
  • This is NOT working for me in Direct Query. This sucks!
  • It's not working in direct query, in my scenario, the data is stored on-premise, and going through the DMG server.
  • Sort by column appears for me using DirectQuery, but appears to be limited to non-calculated columns. So for example, I have a text column I'd like to sort in a specific way, and I've created a calculated column to specify the sort order. When I try to sort the text column by the calculated column I get an error saying: "This column can't be sorted by a column that is already sorted, directly or indirectly, by this column." This is no good. Please fix!!
  • Beef up the Matrix hierarchical sorting functionality as per: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/11185431-add-a-multiple-columns-sort-featue 
  • This functionality already exists. With a DirectQuery, in Report Mode, you see no data, yes, but you can see the fields section, choose the column to be sorted, and you can find 'sort by column' is active, then, selection the sequence column to sort by.

Recent ideas