How to use power query to remove duplicates
Tutor 5 (112 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To remove duplicates in Excel using Power Query, follow these steps carefully:
Step 1: Load Your Data into Power Query
Select your data range or table in Excel.
Go to the Data tab.
Click Get & Transform Data → From Table/Range.
Ensure your data has headers, then click OK.
Your data will open in the Power Query Editor.
Step 2: Identify Columns to Check for Duplicates
Decide which columns should be considered for duplicates. For example:
If duplicates are based on the entire row, select all columns.
If duplicates are based on one specific column, select only that column.
Step 3: Remove Duplicates
In the Power Query Editor, select the column(s) that determine duplicates.
Go to the Home tab in the editor.
Click Remove Rows → Remove Duplicates.
Power Query will retain only the first occurrence of each duplicate and remove the rest.
Step 4: Load the Cleaned Data Back to Excel
Click Home → Close & Load.
The data will be loaded back into Excel as a new table with duplicates removed.
Notes and Tips
Power Query removes duplicates dynamically, which means if the source data changes, you can refresh the query to update the table.
You can also combine this with other transformations like filtering or sorting before removing duplicates.
This method works identically on Windows and Mac versions of Excel that support Power Query.
Example
Suppose you have a table of customer emails:
| Name | Country | |
|---|---|---|
| John | [email protected] | USA |
| Mary | [email protected] | Canada |
| John | [email protected] | USA |
After using Power Query to remove duplicates based on the Email column, the table becomes:
| Name | Country | |
|---|---|---|
| John | [email protected] | USA |
| Mary | [email protected] | Canada |
This method ensures no repeated emails exist in your dataset.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why is drop down list not showing in excel
Answers · 0
Why is the drop down list not showing all options
Answers · 1
Why can't I delete drop down list excel
Answers · 1
How to create an Excel drop-down list from a lookup table
Answers · 1