Forum Discussion
aashton
Helper V
5 years agoEquivalent 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
- AlexisOlson
Super User
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.
- aashton
Helper V
Yes, thank you, CONTAINSSTRING works!