I would like to remove unique IDs and keep duplicates.
e.g.)
ID | Name |
1 | Apple |
1 | Apple |
2 | Banana |
3 | Watermelon |
3 | Watermelon |
4 | Strawberry |
5 | Peach |
Remove unique IDs, but keep duplicate IDs.
ID | Name |
1 | Apple |
1 | Apple |
3 | Watermelon |
3 | Watermelon |
Does anyone know how to approach this?
Thank you!
Kazumi
Solved! Go to Solution.
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.
Sample attached.
Summarize as suggested by @roadhouse is probably simpler
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.)
ID | Name |
1 | Apple |
1 | Apple |
3 | Watermelon |
3 | Watermelon |
Thank you,
Kazumi
Hi jdunkerley79,
Thank you for your reply.
This is exactly what I was looking for.
Kazumi
@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.)
ID Name 1
Apple 1 Apple 3 Watermelon 3 Watermelon
Thank you,
Kazumi
Sure, use the Generate Rows tool to add new rows based on count. Updated workflow is attached.
roadhouse
Hi roadhouse,
Thank you! This is very useful.
Kazumi
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!
Hi RusselID,
Thank you for your suggestion! I just downloaded the package.
Kazumi