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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Sam7
Advocate II
Advocate II

Year Month Ordering

Hello,  

Sam7_0-1649689483071.png

How do I put these in order?

I have created a dates table, created this month year column, now I want to show all date, have a continuous x axis and want the order to be correct.  I have read numerous blog posts but can't find the answer.  I have tried sort etc, but as the month year is text it is not recognised. I have tried to go to the data and use sort order by column, and changed this to numbers - but no luck. 

Please help. 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Sam7 , You need sort column

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Sam7
Advocate II
Advocate II

Thanks!

amitchandak
Super User
Super User

@Sam7 , You need sort column

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

 

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!