Discussion Board for collaboration on QlikView Scripting.
I am looking to create an if statement that is based on a field having a range of possible values.
In SQL, you would write:
If fieldA in ["value1","value2"...] Then
How can I translate this into QV syntax?
Hi, use the funciotion Match()
If(Match(Field,'value1','value2',....), Value True, Value False)
Have a look at the QlikView Match() or WildMatch() functions.
Is there a way to do this using a range instead of typing all values?
Take the following:
Instead of typing each possible value out, could I enter a range into the Match function?
you can't use a range in match function, you have to type all values
in wildmatch you can use wildcard (* ?)
or for range you can use a sql like syntax also in Qlik load
where field1 >= '009' and field1 <= '021';
Something like this should work:
If you have trouble with it I'd convert your field to a number.