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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to convert Date format in "MMM-YY" but order sequence become problem

Hi,

 

I have a question in which I want my date format in my visualisation to "MMM-YY", I know I can make use of the following DAX to perform and get the format I want:

=FORMAT(Data[Date],"MMM-YY")

 

However, the above format will convert the Date into a Text. This become a problem in which my Visualisation will not show in the sequence of the monthly order. For example, you notice from the following graph in which the order run out because date become a text format.

 

Any idea? thanks..Tuff

 

Capture.JPG

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Select a column in Fields. Then go to Modelling tab. Go to Sort by column and select the desired column to be used in sorting selected column.

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

Create another column like

YearMonth = (YEAR(Data[Date])*100)+MONTH(Data[Date])
 
Use this column for sorting order of formated date column.
 
I hope this will solve your problem.
Anonymous
Not applicable

Hi ORBI,

 

I had created a calculated column with the text format (YearMonthShort) I want and this column refer to another column (Reporting Month) in my query.

Hence, how do you sort and how do you sort in the visualisation? Thanks

 

c1.JPG

In DataView. Once click on any column. You will sort on column View. Click on this column and choose the sort column.

 

There best sort column for month year is YYYYMM. Create it using format.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Select a column in Fields. Then go to Modelling tab. Go to Sort by column and select the desired column to be used in sorting selected column.

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors