Forum Discussion
Power Query Question
Dear Experts,
Greetings!
I have a data like below
In column A, we have different Organizations, and in B, I want like if A contains "L3 SW" or "CP Integration", then put L3 SW, but in Conditional column in Else IF, only one criteria can be choosen as below:-
Can you please share how and which format shall be used so that "or" can be used in same condition as below? "," doesn't help seems
Thanks in Advance,
Br,
Anupam
3 Replies
- anupambit1797Steel Contributor
Thanks SergeiBaklan​ can you please confirm if this "or" option is not available via GUI? and only Advance editor is the option with PQ.
Br,
Anupam
In UI you may add one more condition which returns the same value
...
Else if <Reporter team> <contains> <L3 SW> <Then> <L3 SW>
Else if <Reporter team> <contains> <CP Integration> <Then> <L3 SW>
...
That's in formula bar or in Advanced editor. Start conditional column in interface, next modify the code in editor, something like
... AddColumn = Table.AddColumn( PrevStep, "Custom", each if Text.Contains([Reporter Team], "VRF") then "VRF" else if Text.Contains([Reporter Team], "L3 SW") or Text.Contains([Reporter Team], "CP Integration") then "L3 SW" else if Text.Contains([Reporter Team], "CNS") then "CNS" else "nothing", type text), NextStep = ...