Forum Discussion

AlexDantin's avatar
AlexDantin
Helper I
11 years ago
Solved

Does Power BI support sorting established in a data model?

We have several date dimensions in our data model. Within them, we have hierarchies created to flow from date to month to quarter to year. To avoid the alpha sort on Month and Quarter, we have enforced sorting within the model based on some hidden support columns, but when I add "Quarter Year" to a Power BI report, instead of showing Q1 2015, Q2 2015, Q3 2015 etc, it is showing Q1 2014, Q1 2015, Q1 2016 etc.

 

Since Power BI doesn't currently support grouped or stacked axis like Excel, how do I overcome this?

  • Ok - after reviewing the tabular model, the sort is set correctly (and I am exploring the model in Desktop)

     

    BUT -

     

    Power BI doesn't seem to recognize hierarchies established in a tabular model. The sort order was set to support the hierarchy, not the attribute on its own, so we have to change the sort key.

     

    Closing this topic.

     

11 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Power BI Desktop does support a "Group By Column", (whoops, typo, meant "Sort By Column") so you could use that and have a sort by column like "2015Q1, 2015Q2". You could also change your column information to be 2015 Q1, 2015 Q2, etc and then it should sort the way you want.

    • AlexDantin's avatar
      AlexDantin
      Helper I

      When we've already gone through the effort of designing the model based on the users desires for labels and formatting, renaming all the values doesn't seem like a reasonable alternative.

       

      And that still wouldn't solve the issue of displaying Monthly data over more than one year. Power BI recognizes Month name, but lumps all months across years. Not everything should be done as clustered bar/column charts.

  • andre's avatar
    andre
    Memorable Member

    Power BI supports Sort By columns.  Click on the column you are trying to manage then click on Modeling->Sort By Column and pick the "hidden" sort column to enforce the desired sort order

    • AlexDantin's avatar
      AlexDantin
      Helper I

      I'm directly connected to an SSAS tabular model...I don't see "modeling" as an option??

      • andre's avatar
        andre
        Memorable Member

        AlexDantin if you are connecting to the tabular instance, then whoever built that instance for you can add that sort by logic to the date dimension in Visual Studio.  He/She will need to click on the column and then pick Sort By Column in Properties window on the right