Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Coolavin
Partner - Contributor III
Partner - Contributor III

Find records with duplicate Codes

Hello,

I have two fields, email and ExamCode.

I need to find the emails that have duplicate ExamCodes

For example:
Email#1 has ExamCodes:
116C
316C
316C

Email#2 has ExamCodes:
116C
117C
110C
316C

I would need something that would only display Email#1 with the ExamCode that is a duplicate.
It should not display Email#2 

I tried something like this:
Count(TOTAL<Email> ExamCode) >= 2

But it ends up including ones that just have single ExamCodes. I am not sure what I am doing wrong. 

4 Replies
Saravanan_Desingh

Try this,

tab1:
LOAD * INLINE [
    Email#1 has ExamCodes:
    116C
    315C
    316C
];

tab2:
LOAD * INLINE [
    Email#2 has ExamCodes:
    116C
    117C
    110C
    316C
];
Coolavin
Partner - Contributor III
Partner - Contributor III
Author

I don't have access to load. I need to know how to do this in an expression. 

Saravanan_Desingh

Dim: [Email#1 has ExamCodes:]

Exp: Only({<[Email#1 has ExamCodes:]=p([Email#2 has ExamCodes:])>}[Email#1 has ExamCodes:])

commQV91.PNG

Coolavin
Partner - Contributor III
Partner - Contributor III
Author

Email#1 and Email#2 should not be compared to each other. the emails need to be compared only within themselves. 

if an email has a duplicate ExamCode then it should show up. if an email has unique ExamCodes then it should NOT show up.