Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Switch function - with a wild card or without exact expression

Hi Community I am working on an experession, where I am using a switch - True function.  Basically I have various columns with string values and I am trying to create a new column based upon values...
  • v-jiascu-msft's avatar
    9 years ago

    Hi Anonymous,

     

    Function "Search" could help in your scenario. Please have a try.

     

    custom Column =
    SWITCH (
        TRUE (),
        OR ( 'Table3'[Col1] = "Organic Search", 'Table3'[Col2] = "google.com.au" ), "search",
        'Table3'[Col2] = "Facebook.com", "social",
        SEARCH ( "test", 'Table3'[Col3], 1, 0 ) > 0, "myresults"
    )

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale