Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gyuvaraj
Contributor II
Contributor II

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:

pic.jpg

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

pic2.jpg

thanks in advance

regards,

yuvaraj

 

Labels (4)
1 Reply
Marcos_Ferreira_dos_Santos

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,

Marcos