So I've got three fields: User ID, Department Code, and Punch Date.
The user's department codes shift over time, so I need to find the most recent code they were assigned. My thought is to identify the most recent punch date, then select the department code for that row of data, but I'm having trouble coming up with the logic to show that in Alteryx. Does anyone have thoughts on this?
Ex data:
| User ID | Dept Code | Punch Date | Recent Code (Output) |
| 1234 | 1105 | 5/4/2021 | 2002 |
| 1234 | 2002 | 3/15/2022 | 2002 |
| 1234 | 2002 | 3/20/2022 | 2002 |
| 1234 | 1106 | 9/22/2021 | 2002 |
| 1234 | 1105 | 5/27/2021 | 2002 |
| 1445 | 1105 | 2/15/2022 | 1105 |
| 1445 | 1108 | 12/9/2021 | 1105 |
| 1445 | 1108 | 2/7/2022 | 1105 |
| 1984 | 2003 | 3/27/2022 | 2003 |
| 1984 | 2003 | 1/30/2022 | 2003 |
| 1984 | 1105 | 6/19/2021 | 2003 |
Thanks!