Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
Showing results for 
Search instead for 
Did you mean: 

How to avoid duplicates and compare the data with two fields

Hi all,

i have 5 fields in my report.

It should satisfy the below scenarios

account no with p_cardnumber and s_cardnumber having both values(both)

account no with p_cardnumber value and s_cardnumber having no value(primary only)
account no no p_cardnumber value and s_cardnumber having value (secondary only)
account no but no values in p_cardnumber and s_cardnumber(both has no values)

above scenarios i have executed like below
isnull(Primary) and not isnull(Secondary);

(not isnull(Primary) or not isnull(Secondary)) and not exists(tmpId, Id);

(isnull(Primary) and  isnull(Secondary)) and not exists(tmpId, Id);

raw data:


getting below as output but am expecting highlighted cell as output. Here we need to consider whether p_flag and s_flag both are y it comes  in report for that single record alone
for other account number p_flag is y then it will show in report remaining will exclude
if any reocrd came single time then we need to show as it is


thanks in advance




Labels (4)
1 Reply

Hi Gyuvaraj

Have you solved the question by yourself ?

If you don't, please try to be more specific about the question/problem and attach your test, then it will be more easy for people here to help you.

Best regards,