This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I would like to remove unique IDs and keep duplicates.
Remove unique IDs, but keep duplicate IDs.
Does anyone know how to approach this?
Go to Solution.
Go to Solution.
One way to do this would be to get a count of each ID with the summarize tool and then filter on that count. I've attached an example workflow.
An alternative solution is to use a Unique tool and take the duplicate output. In order to avoid duplications you will need to unique this set.
You can then join this back to the original input using a Join tool and then you will get all the records you want.
Summarize as suggested by @roadhouse is probably simpler
Thank you for your quick reply.
I agree that your method separates unique and duplicate values. However, the duplicated value is now combined to one row.
Do you think we can keep the duplicated values in separate rows?
Thank you for your reply.
This is exactly what I was looking for.
@knozawa wrote:Hi roadhouse, Thank you for your quick reply.I agree that your method separates unique and duplicate values. However, the duplicated value is now combined to one row.Do you think we can keep the duplicated values in separate rows? e.g.)IDName1Apple1Apple3Watermelon3Watermelon Thank you,Kazumi
Sure, use the Generate Rows tool to add new rows based on count. Updated workflow is attached.
Thank you! This is very useful.
One other option for this is to use the Only Unique macro from Adam Riely's Crew Macro pack. He released an update/expanded one back in July 2016. Well worth a look if you haven't seen them before!
Thank you for your suggestion! I just downloaded the package.