community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Removing duplicates based on multiple criteria from multiple sources

Asteroid

Hello community,

I am looking for an easier and more concise way of doing this.

 

I have incoming data from 2 sources which look more or less similar, however the dates in Input-1 are slightly off whereas the dates in Input-2 are correct. However, I want to have all the combinations of Employee ID and dates from both the sources in the final output except for the ones which have same employee ID and same month or the difference between the dates in both the sources for same employee ID is within 1 month of each other. In such cases, I would like to keep the record which is as per input-2 and not as per input-1

 

Input-1

Employe IDDateDetail-1Detail-2Detail-3Detail-4
12341/08/16ABCXYZDEFFGH
56781/04/17XYZDEFFGHPQR
13453/08/18DEFFGHPQRABC
145612/12/17FGHPQRABCXYZ
14565/06/17PQRABCXYZDEF

 

Input-2

Employe IDDateDetail-1Detail-2Detail-3Detail-4
89081/08/16ABCXYZDEFFGH
465612/28/16XYZDEFFGHPQR
13459/08/18DEFFGHPQRABC
14561/10/18FGHPQRABCXYZ
14565/01/17PQRABCXYZDEF

 

Output Expected:

 

Employe IDDateDetail-1Detail-2Detail-3Detail-4Source
89081/08/16ABCXYZDEFFGHInput-2
465612/28/16XYZDEFFGHPQRInput-2
13459/08/18DEFFGHPQRABCInput-2
14561/10/18FGHPQRABCXYZInput-2
14565/01/17PQRABCXYZDEFInput-2
12341/08/16ABCXYZDEFFGHInput-1
56781/04/17XYZDEFFGHPQRInput-1
13453/08/18DEFFGHPQRABCInput-1
145612/12/17FGHPQRABCXYZInput-1
Bolide

Hi @ankitsingh2063 ,

This row  is not in my output because there is better data within 29 days ( < 30 days)  in 2nd source  .

clipboard_image_0.png

You can change the formula  to pick what you consider as better  data in 2nd source  .

clipboard_image_1.png

 

There might be other  easier and more concise solutions !

Labels