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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JennaExe
Helper I
Helper I

Custom date format

Hi, I want to shorten the dates on my graphs from e.g. "September 2023" to "Sep-23". I found a way to do this online, by creating a new column in the modelling tab and using the formula Short_Date = FORMAT (‘Table name'[Date], “MMM-YY”). It converts the dates to the right format, but it creates it as Text, which means when I use it on the graph, it sorts the axis alphabetically rather than in date order. I tried converting the type to Date, but that just creates an error where all the dates just show on the Reports tab as #ERROR. Does anyone know how to fix this, so that it is recognised as a Date field and displays in this format? Thank you!

1 ACCEPTED SOLUTION
manvishah17
Solution Supplier
Solution Supplier

Hi @JennaExe , 
You have created MonthYear column. 
Now create a new column by this formula 

 

Sortkey = FORMAT('Date'[Date], "yymm")

 

Then sort your month year column by this SortKey column.
SortingSorting

 

OutputOutput

 

 

 

 

 

 

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

View solution in original post

11 REPLIES 11
manvishah17
Solution Supplier
Solution Supplier

Hi @JennaExe , 
You have created MonthYear column. 
Now create a new column by this formula 

 

Sortkey = FORMAT('Date'[Date], "yymm")

 

Then sort your month year column by this SortKey column.
SortingSorting

 

OutputOutput

 

 

 

 

 

 

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

This has solved it, thanks so much for your help! And thanks to the others for trying to help too!

Idrissshatila
Super User
Super User

it works from my side, there's something missing at your end

Idrissshatila_0-1717578340612.png

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




cherrybi_com
Frequent Visitor

Hi

Create another calculated column 

Month = MONTH(‘Table name'[Date]).
And then sort this Month column and you will get the desired result.

Hello @cherrybi_com ,

 

it won't work like this because what you suggested would sort by month only so it would be like Jan 23 - Jan 24 beside each others, and he wants to sort by month year.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Idrissshatila
Super User
Super User

Hello @JennaExe ,

 

it won't be recognized as a date column, it will be recognized as a text.

 

If the issue is the ordering you can make a sorting for this text you're using  Sort = FORMAT (‘Table name'[Date], “MMYY”). then use it to sort the text column.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hello, many thanks for replying - I don't generally use DAX as I don't understand how it works yet - would you be able to elaborate a bit on exactly what I need to do, as the formula you've suggested looks the same as the one I'm already using, except you've called it 'sort' - how does this make a difference, how does it work? Is this something I put in as another column, or instead of my one? Sorry for being so ignorant! Thank you!

Hello @JennaExe ,

 

I got you an easier approach, sort the column you made by date as in the screenshot

Idrissshatila_0-1717577002408.png

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank you, but sorting the column in Reports doesn't impact on how the dates sort in my graphs, they are still alphabetical??

@JennaExe ,

 

it does impact.

Idrissshatila_0-1717577544322.png

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




It might on a table, but on my graph it's still like this: 

JennaExe_0-1717577864472.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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