Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Using or condition in if statement

Hi All,

I wish to use an or condition in the if statement like:

if Value=3 or Value=4 or Value=5 then 'Y'

else 'N'.

How do I convert it into an if statement?

Thanks,

Asma

1 Solution

Accepted Solutions
Not applicable

Re: Using or condition in if statement

Hi Asma,

' If ' Function has 3 Parts

1- Conditon,

2- IF Condition Holds True

4. If Condition doesn't hold Trye / ELSE

Use can try in your case; ( Value considered as a Field name)

IF(Value='3' or Value='4' or Value='5', 'Y'', 'N')

Hope it helps.

Cheers !

3 Replies
Not applicable

Re: Using or condition in if statement

Hi Asma,

' If ' Function has 3 Parts

1- Conditon,

2- IF Condition Holds True

4. If Condition doesn't hold Trye / ELSE

Use can try in your case; ( Value considered as a Field name)

IF(Value='3' or Value='4' or Value='5', 'Y'', 'N')

Hope it helps.

Cheers !

Not applicable

Re: Using or condition in if statement

I tried this. But it is not working

Not applicable

Re: Using or condition in if statement

I had done a small syntax error. It works now. Thanks

Community Browser