Hi guys!
I've been using Alteryx for about a year now and have always found good advice on the forums. I'm running across a unique problem here and I haven't been able to find any guidance.
To start with, here is a sample of the data I am working with:
| ID | Replaced By | Date |
| 26750 | 31981 | 6/28/2010 |
| 27748 | 31981 | 6/28/2010 |
| 31981 | 31956, 29813 | 5/11/2011 |
| 29813 | 43797 | 1/14/2016 |
| 31956 | 43852 | 1/14/2016 |
| 43797 | | 7/1/2019 |
| 43852 | | 7/1/2019 |
So I am trying to isolate the newest two IDs (last two rows) and create a list of IDs that have preceded each of them. The desired output would be something like this:
| ID | GroupID |
| 26750 | ABC1 |
| 27748 | ABC1 |
| 31981 | ABC1 |
| 29813 | ABC1 |
| 43797 | ABC1 |
| 26750 | ABC2 |
| 27748 | ABC2 |
| 31981 | ABC2 |
| 31956 | ABC2 |
| 43852 | ABC2 |
I feel like I should be doing some sort of macro that looks at the values in the 'Replaced By' column, scans the ID column, finds a match, then pulls the value from the match's Replaced by column, scans the ID column, finds a match, etc... and stops once it finds a match whose replaced by column is null...
Does anyone have any ideas for me, or is there anything I can clarify?
Thanks a lot!