Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Miguel_Angel_Baeyens

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

View solution in original post

2 Replies
Miguel_Angel_Baeyens

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
Author

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