Search code examples
spotfire

Calculated column to return Yes/No if a given word is in a text string


I want to create a new column with Yes or No in sportfire.

I have a column with cities listed delimited by ";" (London;Munich,Barcalona)

Yes want the new column to return Yes if the string contains "London" and No if not

I was trying to find a 'contains' formula


Solution

  • The ~= operator is what you are looking for. if([Column Name] ~= "London","Yes,"No")

    Here is a list of some of the string matching you can do with this operator: http://spotfireplanet.com/string-matching/