Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

If statement when [table]='2' or '3' or '4' and so on?

I wonder if any one could help me, I am using the below code to show a picture if the entity id = 2,3,4,7,10,11,12,13,14,15 but it does not appear to work.

 

if

([Entity ID]='2' or '3' or '4' or '7' or '10' or '11' or '12' or '13' or '14' or

'15',1,0)

Any suggestions how I can get this to work.

Thanks.

1 Solution

Accepted Solutions
MVP
MVP

Re: If statement when [table]='2' or '3' or '4' and so on?

Hi John,

Use the following expression instead:

If(Match([Entity ID], 2, 3, 4, 7, 10, 11, 12, 13, 14, 15), 1, 0)

Hope that helps.

Miguel

2 Replies
MVP
MVP

Re: If statement when [table]='2' or '3' or '4' and so on?

Hi John,

Use the following expression instead:

If(Match([Entity ID], 2, 3, 4, 7, 10, 11, 12, 13, 14, 15), 1, 0)

Hope that helps.

Miguel

Not applicable

Re: If statement when [table]='2' or '3' or '4' and so on?

Thanks Miguel, also found another way that works..

 

if([Entity ID]='2' or [Entity ID]='3' or [Entity ID]='4' or [Entity ID]='7' or [Entity ID]='10' or [Entity ID]='11' or [Entity ID]='12' or [Entity ID]='13' or [Entity ID]='14' or [Entity ID]='15',1,0)

Thanks again for your help.

John

Community Browser