I have this table and I need to filter some rows.
If the same number has line with Account = Tax and Account = Pay, I have to exclude these two rows.
For example, the number 1 has one row with tax and one row with pay in account column, so I have to exclude all rows with number 1.
In the same way, number 2 has one row with tax and another with tax too, so I have to keep them.
Can you help me?
| number | ACCOUNT | COLOR |
|---|---|---|
| 1 | TAX | BLUE |
| 1 | PAY | PINK |
| 2 | TAX | RED |
| 2 | TAX | GREEN |
I expect to get this result:
| number | ACCOUNT | COLOR |
|---|---|---|
| 2 | TAX | RED |
| 2 | TAX | GREEN |
See simple example
Demo
Typo(tax_qty>0 and pay_qty>0) Thank's for @T N.