Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

If condition

I have a table which consists of Company_Code, Customer Code, Customer Code_112

I only want those records in my table where Customer Code is present in Customer Code_112, But I do not want to check for Company_Code=320.

I wrote this if(Exists([Customer Code_112],[Customer Code]),1,0) as Flag

But this is also searching for Company_Code = 320.

Please help.

1 Solution

Accepted Solutions
risabhroy_03
Partner - Creator II
Partner - Creator II
Author

if(Exists([Customer Code_112],[Customer Code]) and Company_Code<>320,1
,if(Company_Code=320,1,0)) as Flag

View solution in original post

2 Replies
risabhroy_03
Partner - Creator II
Partner - Creator II
Author

if(Exists([Customer Code_112],[Customer Code]) and Company_Code<>320,1
,if(Company_Code=320,1,0)) as Flag

Mark_Little
Luminary
Luminary

Try

IF( [Customer Code_112] = [Customer Code] and [Customer Code] <> 320,1,0)

if this is the script you can use this in the where clause, just remove from from the IF