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: 
Coolavin
Partner - Contributor III
Partner - Contributor III

Having problems counting duplicate results.

Hello,

I have two fields, CandidateEmail and ExamCode.

I need to find the Emails that have duplicate ExamCodes, so I am starting with trying to count ExamCodes per email.

For example I have this dataset:

CandidateEmailExamCode
testemailONE@Test.comDCP-109C
testemailONE@Test.comDCP-316C
testemailONE@Test.comDCP-316C
testemailONE@Test.comDCP-316C
testemailONE@Test.comPR000085
testemailONE@Test.comDCP-106C
testemailTWOTWO@Test.comDCP-108C
testemailTWOTWO@Test.comDCP-109C
testemailTWOTWO@Test.comDCP-111C
testemailTWOTWO@Test.comDCP-116C
testemailTWOTWO@Test.comDCP-316C
testemailTWOTWO@Test.comPR000033
testemailTWOTWO@Test.comPR000033

 

I would expect to see something like this:

EmailsDuplicate ExamCodesCount
testemailONE@Test.comDCP-109C1
testemailONE@Test.comDCP-316C3
testemailONE@Test.comPR0000851
testemailONE@Test.comDCP-106C1
testemailTWOTWO@Test.comDCP-108C1
testemailTWOTWO@Test.comDCP-109C1
testemailTWOTWO@Test.comDCP-111C1
testemailTWOTWO@Test.comDCP-116C1
testemailTWOTWO@Test.comDCP-316C1
testemailTWOTWO@Test.comPR0000332

 

Instead when I use this:

=If(Count(Total <CandidateEmail, ExamCode> 1) > 1, Count(Total <CandidateEmail, ExamCode> 1))

I get this(I included the ExamID to show they are different exam records there to count):

CandidateEmailExamCode=If(Count(Total <CandidateEmail, ExamCode> 1) > 1, Count(Total <CandidateEmail, ExamCode> 1))ExamID
testemailONE@Test.comDCP-109C-32557
testemailONE@Test.comDCP-316C-48053
testemailONE@Test.comDCP-316C-48391
testemailONE@Test.comDCP-316C-48848
testemailONE@Test.comPR000085-2733
testemailONE@Test.comDCP-106C-18255
testemailTWOTWO@Test.comDCP-108C-18141
testemailTWOTWO@Test.comDCP-109C-18140
testemailTWOTWO@Test.comDCP-111C-44998
testemailTWOTWO@Test.comDCP-116C-48714
testemailTWOTWO@Test.comDCP-316C-48195
testemailTWOTWO@Test.comPR000033-2608
testemailTWOTWO@Test.comPR000033-2607

 

Is this the wrong expression for something like this? Or am I using it wrong?

=If(Count(Total <CandidateEmail, ExamCode> 1) > 1, Count(Total <CandidateEmail, ExamCode> 1))

 

 

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It works for me when I load your first table above as sample data. Can you upload a sample qvf that shows your problem?

-Rob

stevejoyce
Specialist II
Specialist II

Coolavin
Partner - Contributor III
Partner - Contributor III
Author

Attached is the qvf file.

Coolavin
Partner - Contributor III
Partner - Contributor III
Author

The other question was to ask how to do it. This question is asking why it's not working. I figured I needed to add more details in the explanation as well. 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The app contains section access, I can't open it. 

-Rob