Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Newsense2020
Contributor III
Contributor III

Identifying duplicates based on several criteria

Hi experts,

I am quite new to qlik sense and am seeking for help from experts in this forum.

Beneath is an examplary table. We have several customers with individual "Nr". Those are assigned to "Groups". As well we have some information on the customer As "Name 1", "Name 2" and "Street". 

NrName 1Name 2StreetGroup
1254OliverKahnAlphastreet111
1376OliverKahnAlphastreet222
5432OliverKahnBetta Street222
6543PhilippLahmFleet Street111
2222MichaelBallackDrown Street111
3333ThorstenFringsZero Road222

 

The following rules should be applied: If somebody has the same "name 1", "name 2" and "Street", this is one person.

My intention would be to create an additional field based on the given information as identifier and link the information Nr. and Group. Here an example:

IdentifierNrName 1Name 2StreetGroup
Oliver Kahn Alphastreet1254; 1376OliverKahnAlphastreet111;222

 

Could anyone help me?

1 Solution

Accepted Solutions
Taoufiq_Zarra

Maye be :

Data:

LOAD * INLINE [
    Nr, Name 1, Name 2, Street, Group
    1254, Oliver, Kahn, Alphastreet, 111
    1376, Oliver, Kahn, Alphastreet, 222
    5432, Oliver, Kahn, Betta Street, 222
    6543, Philipp, Lahm, Fleet Street, 111
    2222, Michael, Ballack, Drown Street, 111
    3333, Thorsten, Frings, Zero Road, 222
];

output:

load [Name 1], [Name 2],concat(Nr,';') as Nr, concat([Group],';') as [Group], [Name 1]&' '&[Name 2] &' '& Street as Identifier resident Data group by  [Name 1], [Name 2], Street
;

drop table Data;

Capture.PNG

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

In a table, use Name 1, Name 2 and Street as dimensions. Then use the measures:

Name: Nr,   Expression: Concat(DISTINCT Nr, ';')

Name: Group Expression: Concat(DISTINCT Group , ';')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Taoufiq_Zarra

Maye be :

Data:

LOAD * INLINE [
    Nr, Name 1, Name 2, Street, Group
    1254, Oliver, Kahn, Alphastreet, 111
    1376, Oliver, Kahn, Alphastreet, 222
    5432, Oliver, Kahn, Betta Street, 222
    6543, Philipp, Lahm, Fleet Street, 111
    2222, Michael, Ballack, Drown Street, 111
    3333, Thorsten, Frings, Zero Road, 222
];

output:

load [Name 1], [Name 2],concat(Nr,';') as Nr, concat([Group],';') as [Group], [Name 1]&' '&[Name 2] &' '& Street as Identifier resident Data group by  [Name 1], [Name 2], Street
;

drop table Data;

Capture.PNG

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Newsense2020
Contributor III
Contributor III
Author

@Taoufiq_Zarra : That was what I was looking for. Thank you!