I have a data set that contains financial data. There are two types of records; R and D. Regular records are the total price paid for an order, and the D records are the discount for the Regular records. What I'm trying to do is determine how often we miss the discount in regards to our payment terms. In order to do this, I need to remove all R records that have a correlating D record. I've attempted to do this by removing duplicates based on specific columns (Invoice #, Item #, Date, etc). This works, but only removes the duplicate row and not both rows.
Is there a way to remove BOTH rows based on the duplicate condition, that way I'm only left with R records that contain discountable terms but have no correlating D record?
Is there a way to remove BOTH rows based on the duplicate condition, that way I'm only left with R records that contain discountable terms but have no correlating D record?