Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have a problem I want to check if 1 string is the same than another but in a diferent order in a table measure
Example:
string1= Jupiter,mercury
string2= mercury,Jupiter
and return "yes" if its the same or "no" if its different
Solved! Go to Solution.
Hi @guy17829393 ,
This is my test data.
Adding a custom column in the power query editor.
= if Text.Combine(List.Sort(Text.Split([String1], ",")), ",") = Text.Combine(List.Sort(Text.Split([String2], ",")), ",") then "yes" else "no"
Then the result is as follows.
If I have misunderstood you please clarify in a follow up reply.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @guy17829393 ,
This is my test data.
Adding a custom column in the power query editor.
= if Text.Combine(List.Sort(Text.Split([String1], ",")), ",") = Text.Combine(List.Sort(Text.Split([String2], ",")), ",") then "yes" else "no"
Then the result is as follows.
If I have misunderstood you please clarify in a follow up reply.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @guy17829393
The approach depends on how you are going to compare the two strings. Are you selecting from two dropdowns, etc? Are they from separate tables? Same column but different rows?