I have data that looks like this:
invoice | dept | date |
---|---|---|
12345 | Xfer Bills | 2022-03-05 |
12345 | Vendor Mgmt | 2023-07-15 |
12345 | Government | 2023-07-29 |
12345 | Vendor Mgmt | 2023-09-16 |
12345 | Government | 2023-11-25 |
12345 | Government | 2023-12-30 |
12345 | Government | 2024-02-03 |
What I am trying to get back is the following:
invoice | dept | date |
---|---|---|
12345 | Xfer Bills | 2022-03-05 |
12345 | Vendor Mgmt | 2023-07-15 |
12345 | Government | 2023-07-29 |
12345 | Vendor Mgmt | 2023-09-16 |
12345 | Government | 2023-11-25 |
I was thinking of trying to do a Lead or Lag and see if the next/previous had changed. I am trying to get a path of an invoice