Forum Discussion

TGKiruba's avatar
TGKiruba
Frequent Visitor
1 month ago
Solved

Month Sorting Issue in Fabric Semantic Model (Direct Lake) – Jan/Feb/Mar sorting in PBI desktop

I’m using a Fabric Semantic Model (Direct Lake) with a live connection in Power BI Desktop. My Dim_Calendar has:

MonthNumber (1–12)

MonthNameShort (“Jan”, “Feb”, “Mar”)

MonthDisplaySorted (“01 Jan”, “02 Feb”)

YearMonth (YYYYMM)

Problem: In the new Power BI visuals, the line chart X‑axis will not sort months chronologically. It always sorts alphabetically when using text fields:

Apr, Aug, Dec, Feb, Jan, Jul, Jun, Mar, May, Nov, Oct, Sep

And when using YearMonth, the axis shows numeric labels (202301, 202302…) instead of month names.

Limitations observed:

Sort By Column is disabled for live semantic models

Axis Type (Categorical/Continuous) is removed in new visuals

Text fields always sort alphabetically

New visuals don’t allow composite axis (sort by YearMonth, display MonthNameShort)

Question: Is there any supported way (in Direct Lake + new visuals + live semantic model) to display Jan, Feb, Mar on the X‑axis with correct chronological sorting, or using “01 Jan” prefixes?

6 Replies

  • This is a model side setting rather than a report side one. Sort By Column is disabled in the report when you use a live connection because the sort has to be defined on the semantic model itself, and once it is, every live connected report picks it up automatically.

    Open your Direct Lake semantic model in Fabric (Open data model in the workspace, or edit it in the web modeling view), select the MonthNameShort column, and set Sort by column to MonthNumber. Do the same for MonthDisplaySorted if you want the "01 Jan" version sorted correctly. Save the model, then refresh the visual in Power BI Desktop and the months will show Jan, Feb, Mar in the right order.

    If you cannot use the web modeling view, connect Tabular Editor to the semantic model's XMLA endpoint and set the SortByColumn property there. Direct Lake supports Sort By Column since it is metadata only.

     

    If this worked for you, please mark it as the accepted solution and give it a kudos.

     

    Best regards,
    Shai Karmani

     

    Let's connect in LinkedIn

    • TGKiruba's avatar
      TGKiruba
      Frequent Visitor

      Thank you, response is really helpful

  • TGKiruba's avatar
    TGKiruba
    Frequent Visitor

    “Thanks for the suggestion.
    In my Direct Lake semantic model, Sort By Column is greyed out in the Fabric web modeling view.
    The model dim calendar is auto‑generated from a Lakehouse (notebook), and metadata editing is not enabled.
    Because of this, I cannot set Sort By Column on MonthNameShort or MonthDisplaySorted.
    Is there any workaround for auto‑generated Direct Lake semantic models where Sort By Column is disabled?”

     

    • v-aatheeque's avatar
      v-aatheeque
      Community Support

      Hi TGKiruba 

      Based on your description and the screenshot, this is an expected limitation of certain auto-generated Direct Lake semantic models rather than an issue with your calendar table.

      • In Direct Lake semantic models created automatically from a Lakehouse, some model metadata properties (including Sort by column) are read-only unless the semantic model supports metadata editing. When metadata editing isn't available, the Sort by column property appears disabled (greyed out), preventing you from assigning MonthNameShort to sort by MonthDisplaySorted.
      • .Why this happens
        i) Your semantic model was auto-generated from a Lakehouse.
        ii)Metadata editing is not enabled/supported for this model. As a result, model properties such as Sort by column cannot be modified in the Fabric web modeling experience.

      Useful Links : Learn about editing semantic models in Direct Lake storage mode in the web - Microsoft Fabric | Microsoft Learn
      Solved: Re: Sort column in table by another column when ta... - Microsoft Fabric Community

      Hope this helps !!

      Thank You.

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi TGKiruba 

        Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.