Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if and statement syntax

hi i have the following code.

i am trying to do a lookup based on two conditions in the same statement

the first condition provides the correct data, however the second condition does not work.

could you please provide any input for syntax correction.

1.

if(Master_Item.Subassignment= 'x',

Cost_Center_Mapping.Subassignment,

2.

if(Master_Item.Subassignment ='x' ,

and [Bank Code] <> '',

[Bank Code]))

this is for the subassignment field name in the table

1 Reply
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

it seems there is a comma before the and.

if(Master_Item.Subassignment ='x' and [Bank Code] <> '',

[Bank Code]))