I have a custom column in power query that shows a value if a word is found in another column. It was working great until a situation came up that threw it off due to the data that can be entered by the user.
This is the if statement I am currently using: if Text.Contains([Location], "New York ") then "Zone 5" and this works great until it encounters a field with "New York State" or some other combination using New York. Is there a way of making an If/And statement using the M language to evaluate this. I need a statement that will do the following: If Text Contains New York and Doesn't Contain State then Zone 5. I am new to the M language so still trying to get a handle on it.
Thanks.
Bookmarks