Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
wesbrowning
Partner - Contributor III
Partner - Contributor III

IF statement to match string within field

I've been trying many ideas but no luck and hoping the community can assist. 

I am wanting to "look" within a field and when I match a particular string of characters, in this case "IBM", return a "Yes" text string into my table.  Something like:

=IF[(Field) Contains string(IBM), Return "Yes"]

I know that's not proper syntax but hoping writing out the logic conveys my goals better.

Any help greatly appreciated!  Thanks... Wes

1 Solution

Accepted Solutions
sunny_talwar

You can also try this

If(Field LIKE '*IBM*', 'Yes')

View solution in original post

5 Replies
sunny_talwar

Try this

If(WildMatch(Field, '*IBM*'), 'Yes')

sunny_talwar

You can also try this

If(Field LIKE '*IBM*', 'Yes')

wesbrowning
Partner - Contributor III
Partner - Contributor III
Author

Thanks Sunny!  This is perfect...

crichter14
Creator II
Creator II

Sunny - what if you wanted to return just the substring that had the 'IBM' in it?  What would you change the 'YES' too.

If(Field LIKE '*IBM*', 'Yes')

Almen
Creator II
Creator II

Should be 

If([Field] LIKE '*IBM*', [Field])