Forum Discussion
gianmarco
5 years agoHelper IV
Remove duplicates based on multiple conditions in Power Query
Dear All,
I have the following table:
| ProdName | CodeValue | SourceCode | Q.ty |
| Apple | NFOE | 74891 | 3 |
| Apple | DNSA | 74891 | 3 |
| Kiwi | FDAD | 74891 | 4 |
| Apple | NFOE | 55117 | 3 |
I want to remove duplicates based on the following conditions:
1) Equal Prodname
2) Different CodeValue
3) Equal SourceCode
So that my table would become as follows:
| ProdName | CodeValue | SourceCode | Q.ty |
| Apple | NFOE (or DNSA) | 74891 | 3 |
| Kiwi | FDAD | 74891 | 4 |
| Apple | NFOE | 55117 | 3 |
Is this operation possible?
Thank You for your help
In the query editor, hold Ctrl and select the ProdName and SourceCode columns, then under Remove Rows pull down choose Remove Duplicates.
Pat
2 Replies
- mahoneypatMicrosoft Employee
In the query editor, hold Ctrl and select the ProdName and SourceCode columns, then under Remove Rows pull down choose Remove Duplicates.
Pat
- gianmarcoHelper IV
Simple as that... Kudos to you mahoneypat