Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Power Query: what is formula?
If Column A contains "arlene" and column B contains "arlene", then YES, otherwise, NO.
Column A | Column B | Condition |
John Peters | Arlene.Winters@e.com | NO |
Sherry De Leon | Kathy.Martin@E.com | NO |
jessica whithers | Kathy.Martin@E.com | NO |
Sandy Alan Dom | Sandy.Dom@E.com | NO |
arlene w. | Arlene.Winters@e.com | YES |
arlene w. | Arlene.Winters@e.com | YES |
arlene w. | Kathy.Martin@E.com | NO |
Solved! Go to Solution.
Hi @electrobrit
As a custom column
=Text.Contains([Column A],"arlene",Comparer.OrdinalIgnoreCase) and Text.Contains([Column B],"arlene",Comparer.OrdinalIgnoreCase)
@electrobrit wrote:The column results are "error"
What was the error?
@electrobrit wrote:1. how do I add the Yes if true, no if not? I tried to add at end and it didn't work.
= if Text.Contains([Column A],"arlene",Comparer.OrdinalIgnoreCase)
and
Text.Contains([Column B],"arlene",Comparer.OrdinalIgnoreCase) = true then "YES" else "NO"
@electrobrit wrote:2. it would not take the "and" so I used "&" and it seemed to work when doing custom column (it said not syntax error have been detected) but is that correct for what I'm trying to do?
'and' worked for me, unsure why it did not work for you
Proud to be a Super User!
Hi @electrobrit
As a custom column
=Text.Contains([Column A],"arlene",Comparer.OrdinalIgnoreCase) and Text.Contains([Column B],"arlene",Comparer.OrdinalIgnoreCase)
@Zubair_Muhammad thank you for your response!
The column results are "error"
1. how do I add the Yes if true, no if not? I tried to add at end and it didn't work.
2. it would not take the "and" so I used "&" and it seemed to work when doing custom column (it said not syntax error have been detected) but is that correct for what I'm trying to do?
@electrobrit wrote:The column results are "error"
What was the error?
@electrobrit wrote:1. how do I add the Yes if true, no if not? I tried to add at end and it didn't work.
= if Text.Contains([Column A],"arlene",Comparer.OrdinalIgnoreCase)
and
Text.Contains([Column B],"arlene",Comparer.OrdinalIgnoreCase) = true then "YES" else "NO"
@electrobrit wrote:2. it would not take the "and" so I used "&" and it seemed to work when doing custom column (it said not syntax error have been detected) but is that correct for what I'm trying to do?
'and' worked for me, unsure why it did not work for you
Proud to be a Super User!
@Chris Thanks, I didn't have the "if" in front.That worked perfectly.
Thank you for both @Zubair_Muhammad and @ChrisMendoza for the great help
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |