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 September 15. Request your voucher.

Reply
pantrax
Frequent Visitor

Column sort on date not working as expected

Hello! Trying to get sorting by date to work as i want, but run into a problem. I got a date column with "1.1.2018" etc using this as x axis allows me to drill down from year to daily. Problem is this sorts badly in a column chart giving me jan,nov,des if my data is from 01.11.2017 through 31.01.2018 I did some digging around and made a calculated column (YearMonth) and got that part working, it currently shows 201801,201712 etc as text. If i use this on the x axis i get close to what i'm looking for. I get it sorted in the order of earliest to last month (Yay!). No drill down available, and i get why. But the reason i made this calculated column was cause i read you could set the "date" column to use "YearMonth" with Sort by Column and then it should then sort correctly. Thats not whats happening with me though. Its not interested in changing the sorting from jan,nov,des - am i misunderstanding something? This is all in the same table.

bilde.pngbilde.png

 

 

5 REPLIES 5
Anonymous
Not applicable

@pantrax,

I am unable to reproduce your issue, sorting works as expected in column chart, please view my example. Could you please share sample data of your table? And have you sorted your date fields by other columns?

1.JPG2.JPG3.JPG

Regards,
Lydia

zayan
Regular Visitor

Hi @pantrax

 

Did you try chnging the data type in query editor? / or you could use another custom column based on "date" column.

pantrax
Frequent Visitor

Dont want to change it from date to another data type. I'm sure it'll just create other problems. I tried making a new custom column and sorting by it but didn't help any.

Greg_Deckler
Community Champion
Community Champion

That's a bit strange. I have a calendar table and the Date field is set to a data type of Date/Time and all of the sorting works as one would expect. Is your Date column a Date/Time data type in the model?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Yes it is. I've also tried YearMonth on both text and date.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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