Forum Discussion
hkbs
5 years agoFrequent Visitor
Sort number within a cell separated by comma Desktop
Sort number within a cell separated by comma Desktop Hi I am hoping that if anyone around can guide me a way on this, I have similar issue of a old post (link below) however involved to cell ex...
- 5 years ago
Sure,
you have to transform to number in order to get the sort right and then back to text in order to combine them in once field again:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjTQMTTVMdIx0zHXsdAxUIrVAYpZ6hiZ6BgaAwXAUkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Value = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Value", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Sort DESC", each Text.Combine(List.Transform(List.Sort(List.Transform(Text.Split([Value],","), Number.From),Order.Descending), Text.From),",")) in #"Added Custom"
hkbs
5 years agoFrequent Visitor
Thanks indeed for all the help! This workssss!
You are absolutely star!!!!!!!!!
amitchandak thanks so much for the intro too!
wish u both have a great day ! 🎉🥰😘sending lots of love to u both!