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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

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.
Anonymous
Not applicable

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

@Anonymous , 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-fc4095ae9afd

 

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors