web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Remove duplicates rows...
Power Automate
Answered

Remove duplicates rows from datatable based on column name

(0) ShareShare
ReportReport
Posted on by 12
In Power Automte Desktop, I have a datatable. I need to remove duplicate rows in that datatable based on the single column (Invoice Number)
 
Here is my input datatable.
 
Here need to remove rows based on column "Invoice Number"
 
 
I want output like this:
Categories:
I have the same question (0)
  • Suggested answer
    nitishsh91 Profile Picture
    200 on at
     
    You can apply the below steps to remove duplicates:
    Use a For Each loop action to iterate over the rows of the input DataTable.
    Check if the row already exists in the output DataTable.
    If the invoice number does not exist in the output DataTable, add the current row to it.
     
    Hope this helps.
  • Verified answer
    Mark Nanneman Profile Picture
    993 Moderator on at
    To remove perfectly duplicated rows (all column values are the same) use the "Delete duplicate rows from data table" action.
     
     

    However, in your example I noticed that you have a 1100--Not received and a 1100--Received.  If you want to remove duplicates on only the "Invoice Number" column, then you'd have to use a different method.  First you'd have to decide which "Invoice Status" you wanted to keep, "Received" or "Not Received". 

    Then you could extract the "invoice number" column to a list, remove duplicates from it, then loop through each distinct "invoice number" in the list and filter the first table for that invoice number and the status "Received", and and add a new row with that number and "Received" if there are rows found with that number and received, or add a row with that number and "Not Received" if no rows are found with the filter.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard