Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

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

You can also try this

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

View solution in original post

5 Replies

Try this

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

You can also try this

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

View solution in original post

Partner
Partner

Thanks Sunny!  This is perfect...

Creator
Creator

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')

Creator
Creator

Should be 

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