Forum Discussion

LUCASM's avatar
LUCASM
Helper IV
7 years ago
Solved

CASE Statement with Like

I need to replicate this SQL case statement in Power BI somehow.     CASE WHEN [PC Name] like '%ZENBUS%' THEN 'BUSINESS' WHEN [PC Name] like '%ZENWEB%' THEN 'ONLINE' WHEN [PC ...
  • parry2k's avatar
    parry2k
    7 years ago

    LUCASM try this

     

    Type = 
    SWITCH( TRUE(),
    SEARCH( "AZN ZENBUS", Table2[col],,0) <> 0 , "Business",
    SEARCH( "AZN ZENWEB", Table2[col],,0) <> 0 , "Online",
    "Store"
    )