Forum Discussion
mpi_gov_vn
5 years agoFrequent Visitor
Correctly sort a list of text
Hi guys, I have a list like the picture below. If I use List.Sort, the result is like below Is there any way to correctly sort this list into {Column1, Column2, ..., Column10, Column...
- 5 years ago
Hi mpi_gov_vn,
You can provide a function as the 2nd argument of List.Sort, that transforms each value into the value to sort by.
In your case this should work:
List.Sort( YourList, each Number.From( Text.AfterDelimiter( _, "Column" ) ) )
OwenAuger
Super User
5 years agoHi mpi_gov_vn,
You can provide a function as the 2nd argument of List.Sort, that transforms each value into the value to sort by.
In your case this should work:
List.Sort( YourList, each Number.From( Text.AfterDelimiter( _, "Column" ) ) )- mpi_gov_vn5 years agoFrequent Visitor
Works like a charm! Thanks OwenAuger