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

find duplicate

hi all,

this might be a simple one:

in a user-table i have one field "Email".

In a first step: I want to identify all email addresses that have been used more than once.

In a second step: I want to count the number of appearances per email address.

Thanks for some hints!

K

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

If UserFile has UserID and Email, the EmailFile (see the script below) will give details of emailCount and UserIDList

UserFile:

LOAD UserID,Email,... from ...(your datasource);

EmailFile:

load Email,Count(UserID) as EmailCount, Concat(UserID,'|') as UserIDList

resident UserFile Group By Email;

View solution in original post

5 Replies
Not applicable
Author

Sorry, i was not clear on this one:

I want to do this in the LOAD script.

nagaiank
Specialist III
Specialist III

If UserFile has UserID and Email, the EmailFile (see the script below) will give details of emailCount and UserIDList

UserFile:

LOAD UserID,Email,... from ...(your datasource);

EmailFile:

load Email,Count(UserID) as EmailCount, Concat(UserID,'|') as UserIDList

resident UserFile Group By Email;

Anonymous
Not applicable
Author

Hello NagaianK:

I was looking at your instructions regarding this post.  How would I be able to filter the List Box to show only those 'email addresses' that have been used MORE than once?

Thanks

David

Anonymous
Not applicable
Author

Hi again NagaianK:

Just to clarify the earlier email, I have adapted your solution to my own situation of course.  My script purpose is to identify doctors who have the same name.  The partial script is as follows:

[DOCTORS]:

Load DocNbr,

        DocName,

        Doc Inits,

        DocName & ' ' & DocInits AS DoctorName,

.

.

[DOCCOUNTERS];

Load DoctorName,

        Count(DoctorName) as DocCount,

        Concat(DoctorName, '|' as DupList

        resident DOCTORS group by DoctorName;

In the ListBox, I get the duplicated DoctorNames as well as those that are unique.  My question is how to display only the duplicates?

Thanks

David

nagaiank
Specialist III
Specialist III

Probably, you may create a listbox for the expression

If(DocCount > 1,DoctorName)