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 Automate
Answered

Filter Duplicate rows

(0) ShareShare
ReportReport
Posted on by 150

I have an Excel file on OneDrive with duplicate data in the HR column. As a result, I have to copy the highlighted yellow rows and paste them into a new sheet. For example, if the HR Column contains 1Jyothsna, 2 Meghana, 3 Priyanka, 3 Neha, and 1 Samuel, I have to copy the rows 1Jyothsna, 1 Meghana, 1 Priyanka, 1 Neha, and 1 Samuel.  (PAD)

File 1.PNG

File 2.PNG

I have the same question (0)
  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @kiran_g !

     

    My table in excel worksheet:

    NathanAlvares24_3-1698848375523.png

     

    You can try out the following flow:

    NathanAlvares24_0-1698848219047.png

    NathanAlvares24_1-1698848251618.png

    I used a list to store the HR column data. So loop and increment by 1 for each HR column data using %ExcelData[LoopIndex][2]%.

     

    Result:

    NathanAlvares24_2-1698848334746.png

     

    So I haven't extracted the file from the OneDrive for this flow. I am assuming that you have done that. But I hope the logic is correct. Hope this helps.

     

    Regards,

    Nathan Alvares

    ----------------------------------------------------------------------------------------------------------------------------------------

    If this helps & solves your problem, please remember to give a "Thumbs up" and "Accept my solution" as it will help others in the future.

  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @kiran_g 

     

    Another simple approach you can try 🙂

     

    Nived_Nambiar_0-1699181835752.png

     

    Here for demo purposes, i have created the datatable using create datatable action like below

    Nived_Nambiar_1-1699181887739.png

     

    Now using run.net script action i wrote a linq query which group by HR column and take first values out of it and store the results in a datatable like below

    Nived_Nambiar_2-1699181968666.png

     

    References to be loaded field should have folder path where required dll files are stored 

     

    input and output arguments looks like below

    Nived_Nambiar_3-1699182023881.png

     

    Script should be like this 

    Nived_Nambiar_4-1699182041445.png

     

    Output from .net run script should be like this : 

    Nived_Nambiar_5-1699182071110.png

     

     

    I hope this is as expected.

     

    For more details on how to run a linq query follow the steps as below

    https://www.linkedin.com/pulse/how-run-net-script-action-empowers-data-table-power-automate-bysani/

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • kiran_g Profile Picture
    150 on at

    Thank you @Nived_Nambiar

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard