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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Usman640
Frequent Visitor

How to Sort Month Year Column. (Text Format)

I have a data I want to Sort Month in Order. In Slicer when selecting any thing other than Current Exception month need to be sorted.

Please help. Thanks in Advance.

Usman640_0-1661465664093.png

Usman640_1-1661465727546.png

 

 

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your calendar table looks like, but I tried to create a sample like below.

I suggest creating MonthYear Sort Calculated Column like below and then sort the Month-Year column by it.

please check the below picture and the attached pbix file.

 

Picture1.png

 

MonthYear Sort CC = 
ENDOFMONTH('Calendar'[Date])

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi Jihwan_Kim,

Thank you for your answer. But the problem is if you look into my 1st Column It has Other values like T6, T5,T4 Etc. I dont have Calendar Table for this.

amitchandak
Super User
Super User

@Usman640 , You need to have a sort column for that. You have a handle based on time

 

Format(datevalues([Dynamic X axis] &"-2022"), "mmdd" )

 

Add additional conditional for other and mark this as sort column https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

But my advice would be to explore field parameters for dynamic Axis, Above seem like old method 

https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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