Alteryx Designer Desktop Discussions

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

Deleting certain records

JohnO
7 - Meteor

JohnO_0-1651166153469.png

I have a list of customers and partners that I have to sort through. If the customer and the partner are the same number I can delete it. If the customer and partner are different numbers I have to keep the entire record.

 

In the above example 10042  and 10054 can be deleted but all records for 10044 and 10068 must be kept.

 

I'm drawing a blank on how to do this so any help is much appreciated.

 

Thanks!!

5 REPLIES 5
DataNath
17 - Castor

Possibly a little too long-winded/brute-forced but let me know how you get on with this. Workbook that works with your example is attached.

 

DataNath_0-1651174102233.png

 

fmvizcaino
17 - Castor
17 - Castor

Hey @JohnO ,

 

You can use the filter tool to achieve that. 

fmvizcaino_0-1651174106883.png

 

I would suggest you going through the alteryx for excel users lessons, that would help you figure these things out. :)

https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Excel%20Us...

 

Best,

Fernando Vizcaino

 

fharper
12 - Quasar

probably just an issue with generating sample data but in your example you say 10042  and 10054 can be deleted but all records for 10044 and 10068 must be kept.  but you have some of 10044 and 10068 records where partner and customer match.  so did you intend to delete those? or did you intend to retain all records for a customer where at least one had a mismatching partner value?  the latter is a more complex solution, I did not look closely but @DataNath 's solution seems right for that scenario....the simpler filter suggestion by @fmvizcaino might be the way to go.  interested to have you clarify.

DataNath
17 - Castor

I have to admit I was confused by the wording as it initially seemed like a simple filter would do the trick, but then the fact that 10044/10068 should be kept suggested that if there was ANY records between a customer/partner that didn't match then you had to keep all records for that ID. Obviously if it's the former then the single filter tool will do the trick!

JohnO
7 - Meteor

Thanks DataNath! That wasn't the exact solution but it did put me on the path to solving (I think) my issue. I greatly appreciate it!

Labels