Remove Duplicate Rows From Excel Table Using Power Automate

 Steps to follow:

  1. Create a new flow in Power Automate. To do this, log in to the Power Automate portal, click the "New" button, select "Instant Cloud flow" and select the appropriate trigger.

  2. Add an action to retrieve the data from your Excel table, such as the "List rows present in a table" action.
  3. Add a "Select" action to select the excel table columns from which the Duplicate values need to be removed.

  4. Add the "Compose" action to get the unique rows of the excel table.In the "Compose" action, use the expression "union(body('Select'),body('Select'))" to create a unique rows.

  5. Add "Delete A Row" Action within "Apply To each" action to delete older rows.

  6. Add "Add A row into a table" Action within "Apply To each" action to insert unique rows.Here select output of 'Compose' action as input for 'Apply to each action'.In the column fields of "Add A row into a table" Action, use the expression as 'item()?['ColumnName']' to get the values of the respective column.

    Hope this will work for you and feel free to share your issues.

Comments

  1. More flexible & efficient template here: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Find-and-Remove-Duplicates/m-p/2191403#M1611

    ReplyDelete
  2. Hello, for some reason my flow will only return the values of only one of my columns. Any help would be appreciated

    ReplyDelete
  3. Did not work out. Basically, it deleted all the rows. I had 40 rows, with 10 being duplicates. But when I ran exactly this script, it ended up deleting everything, even though I only checked one column (which is where the duplicates are).

    How can I fix it?

    ReplyDelete

Post a Comment