Forum Discussion

aashton's avatar
aashton
Icon for Helper V rankHelper V
5 years ago
Solved

Equivalent to LIKE

I'm going crazy trying to get a simple formula working.  I want to say, if location_ID is like 'AA%' THEN Y ELSE N.  I've tried:

AA Site = IF(CONTAINS('CRM Sharepoint', 'CRM Sharepoint'[SP_ICIMS_Location_ID], "AA"), "Y", "N")
but every row returns N, even if there is an AA.
 

 

  • CONTAINS searches through a column of values for a particular value. You want to search text for a substring, so CONTAINSSTRING is probably closer to the function you want but LEFT might be a good choice for this situation too.

     

2 Replies

  • CONTAINS searches through a column of values for a particular value. You want to search text for a substring, so CONTAINSSTRING is probably closer to the function you want but LEFT might be a good choice for this situation too.