Forum Discussion

anupambit1797's avatar
anupambit1797
Steel Contributor
May 09, 2025

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

    • SergeiBaklan's avatar
      SergeiBaklan
      MVP

      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 = ...

Resources