Skip to main content
Community site session details

Community site session details

Session Id : wo8YW1SnLeca1wiD6TtAni
Power Apps - Power Query
Unanswered

Removing Duplicates from Merged Tables in Power Query

Like (0) ShareShare
ReportReport
Posted on 23 Jun 2023 18:00:45 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 29 Jun 2023 at 13:54:58
    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 29 Jun 2023 at 13:39:56
    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 our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics

Loading complete