Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

Removing Duplicates from Merged Tables in Power Query

(0) ShareShare
ReportReport
Posted on by 4

I am doing a reconciliation from two different data set to find variances but when I do a full outer join between the tables I get duplicates if one of the tables are more than one row for the merge fields. There no unique identifier so I'm merging them using Resource, Date and hours

 

Table A   
ResourceInvoice IDDateHours
John Doe123458/28/202340
Table B   
ResourceInvoice IDDateHours
John Doe456788/28/202340
John Doe987658/28/2023-40
John Doe765438/28/202340

 

Here's what I'm getting: 

Table A Resource

Table A

Invoice ID

Table A DateTable A Hours

Table B

Resource

Table B Invoice IDTable B DateTable B Hours
John Doe123458/28/202340John Doe456788/28/202340
John Doe123458/28/202340John Doe987658/28/2023-40
John Doe123458/28/202340John Doe765438/28/202340

 

Here's what I want to see:

Table A ResourceTable A Invoice IDTable A DateTable A HoursTable B ResourceTable B Invoice IDTable B DateTable B Hours
John Doe123458/28/202340John Doe456788/28/202340
   40John Doe987658/28/2023-40
   40John Doe765438/28/202340

 

Can someone help me, please?

  • gmelesse Profile Picture
    4 on at
    Re: Removing Duplicates from Merged Tables in Power Query

    This only works for the first record. If there's a same information for another resource, then I'm getting all records from Table A and Table B without any match. For example: If my table are:

    Table A    
    ResourceInvoice IDDateHoursIndex
    John Doe123458/28/2023400
    John Doe2222210/10/2023321

     

     

    Table B    
    ResourceInvoice IDDateHoursIndex
    John Doe456788/28/2023400
    John Doe987658/28/2023-401
    John Doe765438/28/2023402
    John Doe3333310/10/2023323
    John Doe4444410/10/2023-324
    John Doe5555510/10/2023325

     

    I'm getting:

    ResourceTableA.Invoice IDTableA.DateTableA.HoursTableB.Invoice IDTableB.DateTableB.Hours
    John Doe123458/28/202340456788/28/202340
    nullnullnullnull987658/28/2023-40
    nullnullnullnull765438/28/202340
    nullnullnullnull3333310/10/202332
    nullnullnullnull4444410/10/2023-32
    nullnullnullnull5555510/10/202332
    John Doe2222210/10/202332nullnullnull

     

    What I want to get is:

    ResourceTableA.Invoice IDTableA.DateTableA.HoursTableB.Invoice IDTableB.DateTableB.Hours
    John Doe123458/28/202340456788/28/202340
    nullnullnullnull987658/28/2023-40
    nullnullnullnull765438/28/202340
    John Doe2222210/10/2023323333310/10/202332
    nullnullnullnull4444410/10/2023-32
    nullnullnullnull5555510/10/202332
  • gmelesse Profile Picture
    4 on at
    Re: Removing Duplicates from Merged Tables in Power Query

    If a data is only in Table B, I would want the merged record in Table A to show null. How can I compare a null value to previous row only for data that are in both tables?

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Query

#1
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 7

#3
SD-13050734-0 Profile Picture

SD-13050734-0 6

Overall leaderboard

Featured topics