Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
1 year ago
Solved

Sort columns

Hello, I have a table in this style: Concept January February December A 50 30 5 B 100 10 9 Do I need to reorder so that the first column is December? Is this possible? ...
  • danextian's avatar
    1 year ago

    Hi Syndicate_Admin 

     

    You data is not in the best format for reporting. It needs to be unpivoted first so the months will be in one column and the values in another.

    Create a Month Sort column. The example below concanates the monh column with a year. Date.From parses the concatenation as a date. Date.Month returns the month number of the pased date.  Change the column type to whole number after.

    Date.Month( Date.From( [Attribute] & " 2023") )

    In the designer, select the month column, click sort by and select Month sort. The months should now be sorted properly.

     

     

     

  • v-pnaroju-msft's avatar
    1 year ago

    Thankyou, SEMattis ,danextian, for your response.

     

    Hi Syndicate_Admin,

    We appreciate your inquiry on the Microsoft Fabric Community Forum.

    In addition to the information provided by danextian regarding better reporting and accurate month sorting in visuals, please find below the steps to reorder the columns so that December appears first.

    1. Navigate to the Power Query Editor (Home → Transform Data).
    2. In the Query Editor, select the December column.
    3. Drag it to the far-left position, before January.
    4. Click on 'Close & Apply'.

    This will change the order of the columns in your data table but will not affect visuals or sorting in charts.

    If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.

    Thank you.