Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Partha2318
Frequent Visitor

How to sort the month in fabric

hi Team,
How to sort the month in fabric?

Is there any option to sort the month in chronological order in fabric ?

Partha2318_0-1712042771180.png

 

 

 

3 ACCEPTED SOLUTIONS

 
@Partha2318 
Or try below method create calculated column
Month Number = MONTH('Table'[Date])

or 

Month Number = FORMAT('Table'[Date],"MM")

if you use the latter , change the data type to whole number after

after you create your month number , press on the month name column and in the ribbon above in the table tools , you will find something called sort by column , press it and choose month number

 

 

 

I hope I answered your question!

 

Uzi2019_0-1712043421773.png

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

Anonymous
Not applicable

Hi @Partha2318 ,

 

Thank you @Uzi2019  for the quick response and solution. I have an alternative approach for you to consider:

We can create a new table.

MyTable = DATATABLE (
    "Month", STRING,
    "Number", INTEGER,
    {
        {"January", 1},
        {"February", 2},
        {"March", 3},
        {"April", 4},
        {"May", 5},
        {"June", 6},
        {"July", 7},
        {"August", 8},
        {"September", 9},
        {"October", 10},
        {"November", 11},
        {"December", 12}
    }
)

 Create the model relationship.

vtangjiemsft_0-1712112115863.png

Select the Month column of the [MyTable] table and sort by [Number].

vtangjiemsft_1-1712112228985.png

Place the [Month] field of the [MyTable] table instead of the [Month_txt] field of the DimDate table on the visual object.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Ensure that you have a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number.  Create a relationship (many to one and single) from the Date column of your Data Table to the Date column of the Calendar Table.  To your visual, drag Year and Month name from the Calendar Table.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Ensure that you have a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number.  Create a relationship (many to one and single) from the Date column of your Data Table to the Date column of the Calendar Table.  To your visual, drag Year and Month name from the Calendar Table.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Partha2318 ,

 

Thank you @Uzi2019  for the quick response and solution. I have an alternative approach for you to consider:

We can create a new table.

MyTable = DATATABLE (
    "Month", STRING,
    "Number", INTEGER,
    {
        {"January", 1},
        {"February", 2},
        {"March", 3},
        {"April", 4},
        {"May", 5},
        {"June", 6},
        {"July", 7},
        {"August", 8},
        {"September", 9},
        {"October", 10},
        {"November", 11},
        {"December", 12}
    }
)

 Create the model relationship.

vtangjiemsft_0-1712112115863.png

Select the Month column of the [MyTable] table and sort by [Number].

vtangjiemsft_1-1712112228985.png

Place the [Month] field of the [MyTable] table instead of the [Month_txt] field of the DimDate table on the visual object.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Uzi2019
Super User
Super User

Hi @Partha2318 

If you have month number in your data so you can sort the month by month number.

or refer below video 
https://www.youtube.com/watch?v=NvFDasTzP9E

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 
@Partha2318 
Or try below method create calculated column
Month Number = MONTH('Table'[Date])

or 

Month Number = FORMAT('Table'[Date],"MM")

if you use the latter , change the data type to whole number after

after you create your month number , press on the month name column and in the ribbon above in the table tools , you will find something called sort by column , press it and choose month number

 

 

 

I hope I answered your question!

 

Uzi2019_0-1712043421773.png

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.