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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
caito103
Helper I
Helper I

Sorting by Month name using month number doesnt work

Hello!

 

I need hel from you guys. I actually searched abput sort correctly by Month name, creating a Month nummber column and sort the column Month name by Month number, but didt work.

 

 

I have this date column, that have data starting in june 2017 until february 2018:

 

 

I created the following columns by the column with the dates, and the Mes (month) column i selected Sort by Column MesNum(MOnthNumber) in Modeling:

 

 

But when i tried to use it in a graph, is not appearing order it. I tried in the axis with Month, MonthNum and MonthNum Hierarchy:

 

 

What can i do? Im need your experience.

 

Thank you!!

1 ACCEPTED SOLUTION
dramus
Continued Contributor
Continued Contributor

MesNum is defined as Text. Switch it to Whole Number and that will fix the sort.

View solution in original post

8 REPLIES 8
dramus
Continued Contributor
Continued Contributor

By default it's going to sort it alpha-numerically.

 

You will need to set the "Sort By" column for the Month column to be the numeric month column.

 

sort_by.PNG

 

 

I did it, but stll not working, im sorting by the numeric month column.

8QMSxT0WTPCCQpFE2WgfKw

 

 

 

dramus
Continued Contributor
Continued Contributor

Check what the sort by on the visual is:

 

sort_by.PNG

its sort by Month (name) too

 

SRTOBVMBQOyPhH91feVdlQ

dramus
Continued Contributor
Continued Contributor

I can't reproduce the problem you are having with a demo dataset. Can you share your .PBIX file with me?

Of course! There you go.

 

https://ufile.io/ovfpu

 

Can be that the month order have problem because there are two years with differents months? (2017 have from June until December, and 2018 just have January/February)

 

Thank you so much!

dramus
Continued Contributor
Continued Contributor

MesNum is defined as Text. Switch it to Whole Number and that will fix the sort.

Oh man! Was so simple! With it takes a lot haha, thank you so much!!!

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.