Forum Discussion

Mauri_Castro_70's avatar
2 years ago
Solved

Help with Swith() True() Calculated Column with multiple Criterias

Hello Guys,   I am traying to map some values/offerings to specific users using Switch/true with multiple criterias such as:   User_name = SWITCH ( TRUE (), CONTAINSSTRING ('Offering'[Offering...
  • rsbin's avatar
    2 years ago

    Mauri_Castro_70 ,

    Please try the following modification:

    User_name = SWITCH (
                    TRUE (),
                   OR( CONTAINSSTRING ('Offering'[Offering], "Mobility"), CONTAINSSTRING ( [Offering], "Security" ))
    && NOT( CONTAINSSTRING ( [Approver], "L2" ))
    && NOT (CONTAINSSTRING ( [Region], "WW" ))
    && NOT (CONTAINSSTRING ( [Region], "Asia" )) && NOT (CONTAINSSTRING ( [Region], "ANZ" )), "Mike",
    "John" )

    Not sure if this is the final result you are looking for:

    Hope this works.

    Regards,

     

  • Mauri_Castro_70's avatar
    2 years ago

    OMG!!! It worked perfectly! Thanks so much!!!

     

    You Rock!

     

    Mauri Castro

  • rsbin's avatar
    rsbin
    2 years ago

    Mauri_Castro_70 ,

    Glad to hear it worked for you.  As for adding a third argument, simply "nest" them as you would an IF statement in Excel.
    OR( Condition 3, OR ( Condition 1, Condition 2) ).

    Best Regards,

  • Mauri_Castro_70's avatar
    2 years ago

    Excellent!... thanks again for the help!