Forum Discussion
Sorting a string separated by comma using Dax
Hi everybody
I have a column containing some string values that is actually result of this Dax expression. Now as a result of the mentioned Dax I am getting an output which is actually same but the order makes it different.
For example I am getting 3 values in the column as follow.
Belgium, France, Italy
France, Belgium, Italy
Italy, France, Belgium
Technically they are same but order is making them different. So I want to first sort them and want to make a single value of Belgium, France, Italy
I would appreciate any help in this regard.
Thank you.
Rashid Anwar
- Anonymous4 years ago
Hi rashidanwar ,
Does each row have these 3 values? If it is, please have a try.
Measure = "Belgium, France, Italy "If I have misunderstood your meaning, please contact me and provide more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
2 Replies
- amitchandakSuper User
rashidanwar , Create a new column in power query
= Text.Combine(List.Sort(Text.Split([Column1], ", ")), ", ")
- AnonymousNot applicable
Hi rashidanwar ,
Does each row have these 3 values? If it is, please have a try.
Measure = "Belgium, France, Italy "If I have misunderstood your meaning, please contact me and provide more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly