Discussion board where members can get started with QlikView.
I'm very new to Qlikview,
I have an if statement in my load script from sql table , but am having trouble getting the wildcard string comparisons to work.
This is what I have, but it is not matching the '%' to 0 or more characters before or after the string 'events'.
if (( Medium Like '%events%' ), 'PREvents', 'Other') as channel
Also: Is there something that is equivalent to ' NOT LIKE' I like to be able to have a condition based on something that does not contain a string.
if (( Medium NOT Like '%viral%' ), 'Direct', 'Other') as channel
I think you are looking for the wildcard character * (any number of arbitrary characters):
if ( Medium Like '*events*', 'PREvents', 'Other') as channel
and not like should be like
if ( not Medium Like '*viral*', 'Direct', 'Other') as channel
View solution in original post
The answer is in the title of your question ... almost
See function wildmatch()
That worked perfectly.
Thanks for the speedy reply.