Hello,
I have a invoice data and I want to remove any duplicate invoice numbers where the status is "removed". The issue is that there are some invoices that have the "removed" status that I would still want to keep.
Example input date:
| Invoice Number | Amount | Sub-status | Approver |
| 10000 | 500 | Processed | A |
| 10000 | 500 | Removed | |
| 10001 | 200 | Removed | B |
| 10002 | 100 | Processed | C |
| 10003 | 12 | Processed | D |
| 10003 | 12 | Removed | |
Output:
| Invoice Number | Amount | Sub-status | Approver | Keep/Remove |
| 10000 | 500 | Processed | A | Keep |
| 10000 | -500 | Removed | | Remove |
| 10001 | 200 | Removed | B | Keep |
| 10002 | 100 | Processed | C | Keep |
| 10003 | 12 | Processed | D | Keep |
| 10003 | -12 | Removed | | Remove |
My attempt:
I tried the summarize tool, but it didn't work since the sub-status and Approver columns are different. I also tried only summarizing on invoice number, and then joining the data set, but that re-adds the duplicate values.

Summarize tool:
