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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Problem with sorting

Hi,

 

I have an issue withpower bi.I have a column which has  values like AN-1020-oct30 to nov30 2017,whenever Iam applying sort on this it gives based on the alphabetical order.But I  want the sort based on the dates.Latest dates must be come first.

 

 

 

Thanks,

Chunduri

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Please check if the column date type is Date or Text. If it's Text data type, it will sort values based on the first character of each value. You can change type to Date, then it will sort based on date. 

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Qiuyun Yu ,

 

 

Thanks for reply,but it does not accept the datatype change.

 

Thanks,

Alekhya

Hi @Anonymous,

 

It look like text values are not valid date format, so you can't convert them to date type directly. You can create a calculated to get corresponding date format value from this column, then change the new column data type to date. Then sort by new column. 

 

If you don't know how to write DAX to create a calculated column. You can share some sample data, then we can test and share DAX. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.