Forum Discussion

adilk's avatar
adilk
Icon for Helper I rankHelper I
8 years ago
Solved

Unable to run multiple text search in string to create a new column, even via Switch

Hi, I have a column [Ad Set Name] that has text in it such as millenials, students. I want to create a new column where it searches for the main keyword and then assigns a value in the new column. ...
  • v-jiascu-msft's avatar
    8 years ago

    Hi adilk,

     

    How about this formula?

     

    Segment =
    SWITCH (
        TRUE (),
        SEARCH ( "Students", table1[Ad Set Name], 1, 0 ) > 0, "Students",
        SEARCH ( "Creators", 'table1'[Ad Set Name], 1, 0 ) > 0, "Creators",
        "UNKNOWN"
    )

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale