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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
bo_afk
Post Patron
Post Patron

Sorting a day-month column

Hi,

 

I've created a day-month column using the short month name, and day of the month number in my dataset to obtain the following format dd-ShortMonthName, e.g. 01-Sep, 02-Sep...10-Dec etc. How can I order this column so that it on a line graph, it starts with the earliest date first?

 

Many thanks,

afk

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @bo_afk 

 

I think you should create a column like MMDD like 01-Jan, 02-Mar would be 0101, 0302, That will sort on month and date.

What you need is a numeric column to use as the sort order.

MonthDaySort = MONTH ( uvw_RescoMobileAudit[Created On] ) * 100 + DAY ( uvw_RescoMobileAudit[Created On] )

Then you set the sort on the Month/Day to use MonthDaySort.  In the image below I am setting the sort order on [Month Name] to use [Month Number].

 
Community Support Team _ Dina Ye
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

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @bo_afk 

 

I think you should create a column like MMDD like 01-Jan, 02-Mar would be 0101, 0302, That will sort on month and date.

What you need is a numeric column to use as the sort order.

MonthDaySort = MONTH ( uvw_RescoMobileAudit[Created On] ) * 100 + DAY ( uvw_RescoMobileAudit[Created On] )

Then you set the sort on the Month/Day to use MonthDaySort.  In the image below I am setting the sort order on [Month Name] to use [Month Number].

 
Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
ChandeepChhabra
Impactful Individual
Impactful Individual

Hi @bo_afk 

In your table create a new column, use the following formula 

Sort Order = VALUE ( TableName[Date] )

Then Select your ShortMonthName column go to Modeling Tab >> Sort By Col (drop down) select Sort Order Column. The visual should update automatically

---

PS: You can even sort it by your Date Column, just in case you haven't used it for sorting any other column already

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors