Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

checking for duplicate records

Madhur12
8 - Asteroid

I have made a macro from a sample dataset to check for duplicate records. I am trying to do a comparison between customer no and customer name. My goal is to check if 2 customers have the same customer no. If the customer no and customer name is same, it is not a duplicate. Attached is the macro and the sample dataset.

 

I am not able to get the results I want when I run the macro on another dataset. Attaching that as well (dataset 2). Can anyone please help me here?

 

Thanks,

Madhur

7 REPLIES 7
CoG
14 - Magnetar

I think you need to include one more Summarize before your current Summarize to Group By both [Customer No.] and [Customer Name]. That way literal duplicates (same # & Name) are removed:

Screenshot.png

nagakavyasri
12 - Quasar

@Madhur12 there are duplicate Customer names from left input of Join hence you are not getting required output

 

Capture21.PNG

CoG
14 - Magnetar

Whoops! @nagakavyasri- makes a good point. I forgot about the Left side of the Join. I think are both incorrect however, considering the problem statement, I believe you will need to add two Summarize tools (You could also use the Unique Tool instead) in order to isolate unique  combinations of [Customer No.] & [Customer Name]:

Screenshot.png

Madhur12
8 - Asteroid

Thanks @nagakavyasri @CoG !

 

So there are 2 checks I'm trying to run on my dataset through this macro:

 

1. Different customer number but same customer name:Screenshot 2024-01-15 095104.png

 

 

2. Same customer number but different customer name:

SS2.png

 

 

Is it possible to get both these results using a single macro, i.e. (sorting ascending by customer name and sorting ascending by customer number - may be using 2 anchors and 2 browse tools) ? 

 

Thanks!

Madhur

 

Madhur12
8 - Asteroid

Also, I want my output to only give me duplicates both for 1 and 2 above and not to give me unique customer number and customer name combination.

CoG
14 - Magnetar

I'm not exactly sure what you're looking for, so here are two options in one macro, just delete the top two branches or bottom two branches depending on which you prefer:

Screenshot.png

Madhur12
8 - Asteroid

Worked for me. Thank you so much @CoG ! Appreciate it.😊

Labels
Top Solution Authors