cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aashton
Frequent Visitor

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.
 

 

1 ACCEPTED SOLUTION
AlexisOlson
Memorable Member
Memorable Member

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.

 

View solution in original post

2 REPLIES 2
AlexisOlson
Memorable Member
Memorable Member

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.

 

View solution in original post

Yes, thank you, CONTAINSSTRING works!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.