cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
susheel1347
Helper III
Helper III

Sort MMM-YY date format on Matrix

Hi All,

I am creating a matrix & on the columns I have created a format of the date:

 

MMM-YY = FORMAT('Table'[DATE], "MMM-YY") & using the field on the columns & on the values i am using a measure. I want to sort the columns in the Chronologically in the order of year & month. 
 
Can you please help?
 
Thanks
Susheel
 
 
1 ACCEPTED SOLUTION
3 REPLIES 3
Clinical_Epi
Advocate II
Advocate II

Unfortunatelly using that as a solution misses the mark as soon as the chart shows the months for 2 years (or lets say parts of), and you end up with Jan-20 Jan-21 Feb-20 Feb-21 etc...

 

A categorical date heirachy will work for you, but you more than likely will notice some date formatting issues once you play with it enough by crossing date from one year to the next as I mentioned above, people wont put up with what they are not used to and I've seen some really odd date formatting issues. 

So...

What works for me everytime is this very simple routine of creating 2 new columns.

#1) This is the column to be used in the line charts X-axis....

Sales Date = FORMAT(a_my_DATA[Sales Date].[Date], "mmm-yy")
 
#2) use this to sort the date..... 
date_sort = FORMAT (a_my_DATA[Sales Date - copy].[Date], "yyyy-mm" )
 
You can probably work it out from there, the reason I normally duplicate the column in the data is to aviod any annoying pop-up messages stopping me - to avoid that I just do it as a standard these days but is absolutely not neccessary.
 
Good luck 🙂
 

Thanks @daxer-almighty 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors