Forum Discussion
Anonymous
9 months agoNot applicable
Error when sorting rows
I encountered an error when sorting rows. I sorted two columns with Text and Whole Number types in ascending order. The column that caused the error was the one with the Date data type. I made sure t...
- 9 months ago
Hi Anonymous I have loaded same formated data and solve this in a optimal way
here it is before the fix:
After Fixing:
Complete M-Code:
let Source = Table.FromRows( { {"1", "Mon 7/21/25", "Wed 7/23/25"}, {"2", "Thu 7/24/25", "Mon 7/28/25"} }, {"TaskID", "Start_Date", "Finish_Date"} ), CleanAndConvert = Table.TransformColumns( Source, { {"TaskID", each Number.FromText(_), Int64.Type}, {"Start_Date", each Date.FromText(Text.AfterDelimiter(_, " "), [Culture="en-US"]), type date}, {"Finish_Date", each Date.FromText(Text.AfterDelimiter(_, " "), [Culture="en-US"]), type date} } ), Sorted = Table.Sort(CleanAndConvert, {{"Start_Date", Order.Ascending}}) in SortedFind this helpful? ✔ Give a Kudo • Mark as Solution – help others too!
I’d love to stay connected. Join me on LinkedIn for more tips, learning paths, and real-world Fabric & Power BI solutions.
v-achippa
Community Support
9 months agoHi Anonymous,
Thank you for reaching out to Microsoft Fabric Community.
Thank you Mauro89, Royel and ronrsnfld for the prompt response.
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa