Forum Discussion

bbwong's avatar
bbwong
Helper I
4 years ago
Solved

Containstring Function

Hi,

 

Needing help with a formula to calculate the Level of Support containing text of "high intensity" or "standard", with remaining categorized as "Other".

 

ServiceLevel of Support (calcaulate column) if contains:
Support with High IntensityHigh Intensity
Standard SupportStandard
Service Add 1Other
Service Add 2Other
Service Add 3Other

 

With thanks,

 

  • bbwong Maybe:

    Column =
      SWITCH(TRUE(),
        SEARCH("High Intensity",[Service]),"High Intensity",
        SEARCH("Standard",[Service]),"Standard",
        "Other"
      )

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    bbwong Maybe:

    Column =
      SWITCH(TRUE(),
        SEARCH("High Intensity",[Service]),"High Intensity",
        SEARCH("Standard",[Service]),"Standard",
        "Other"
      )
    • bbwong's avatar
      bbwong
      Helper I

      Thanks for the prompt reply.

      I tried the above however getting an error of:
      Function 'SWITCH' does not support comparing values of type True/False with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

      • bbwong's avatar
        bbwong
        Helper I
        Managed to tweek your suggestion and it worked!
         

         

        Column =
          SWITCH(TRUE(),
            SEARCH("High Intensity",[Service]) 1, 0 ) > 0,"High Intensity",
            SEARCH("Standard",[Service]) 1, 0 ) > 0,"Standard",
            "Other"
          )