Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I'm trying to write a statement so that if a cell within a specified column contains 2 or more specified strings then add value to another column
e.g. say I was using email To line data. If the To line (Column A) contained both "john.smith@gmail.com" and "smith.john@gmail.com" then fill Column B with "Multiple Inboxes"
delimiter used in this case between emails would be ";"
I have tried the following but does neither seem to work:
= if Text.Contains([DisplayTo], "john.smith@gmail.com") and Text.Contains([DisplayTo],"smith.john@gmail.com") then "Multiple Inboxes"
else "Not Applicable")
= if Text.Contains([DisplayTo], "john.smith@gmail.com" and "smith.john@gmail.com") then "Multiple Inboxes"
else "Not Applicable")
Solved! Go to Solution.
Hi @Anonymous ,
I think first codes should be correct.
=
if Text.Contains([DisplayTo], "john.smith@gmail.com") and Text.Contains([DisplayTo],"smith.john@gmail.com") then "Multiple Inboxes"
else "Not Applicable"
Please make sure the specified strings in your code are correct. In my sample it works.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I think first codes should be correct.
=
if Text.Contains([DisplayTo], "john.smith@gmail.com") and Text.Contains([DisplayTo],"smith.john@gmail.com") then "Multiple Inboxes"
else "Not Applicable"
Please make sure the specified strings in your code are correct. In my sample it works.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
59 |
User | Count |
---|---|
197 | |
116 | |
107 | |
77 | |
70 |