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
jongee
Frequent Visitor

Order text on my X-axis

How can I define the order of my X-Axis.

x-axis.PNG

I can't seem to get it to go up in the correct Month order.

 

Any suggestions?

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@jongee

 

Please check if the type of your “Year-Month” is Text. If so, please change the Data Type to Date with Format (MMMM yyyy) and then you can get the expected result.

 

666.jpg

777.jpg

Regards,

View solution in original post

4 REPLIES 4
v-sihou-msft
Microsoft Employee
Microsoft Employee

@jongee

 

Please check if the type of your “Year-Month” is Text. If so, please change the Data Type to Date with Format (MMMM yyyy) and then you can get the expected result.

 

666.jpg

777.jpg

Regards,

Anonymous
Not applicable

You need to define what the column should sort by.  Create an index column with a unique value in descending order for each distinct Calendar MonthName in your case, then select the CalendarMonthName Column and choose "Sort By" and select your new index column. 

 

Date Sort By.png

 

Create an additional column in your model that has the following properties: YYYY-MM.  So June 2016 would have a value of 201606.

 

Sort Order = FORMAT('DimDate'[Date], "YYYY-MM")

THEN sorted the Year-Month column by the Sort Order Column.

sdjensen
Solution Sage
Solution Sage

Is your month from a date/time table having all the dates from the beginning to the end of your data or from the same table as your measure?

 

If it's from a date/time table you will have to create a column in this table with a month number and they sort your month by this column using the "Sort by Column" feature on the modeling tab.

 

If you don't have a date/time table create one at once and then create a link between your values table and your new date/time table, but still remember to have both a column with the month number and month name. If you need to do this accross multiple years you will have to create to columns where one have the values .... 2015 November, 2015 December, 2016 January, 2016 February... and sort this by a column with the values ...201511, 201512, 201601, 201602... 

 

There is prenty of great sources on how to create a date/time table on the internet... you could try to read this one.

/sdjensen
Anonymous
Not applicable

You need to create a second column that has numbers corresponding to the order you want, then use the Sort By Column option under Modeling to use that column to sort the first.

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.