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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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