Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Rnaval
Post Patron
Post Patron

Need help combining two worksheets

I have two worksheets. The second worksheet contains data that are not in the first worksheet (IP addresses) which I would like to identify and then append to the first worksheet. In Excel, using the second worksheet, I search for the IP Addresses that are not found in the first worksheet and then copy and append all of those rows to the first worksheet. I would like to do this in Power BI / Power Query so that I can automate / schedule this.

1 ACCEPTED SOLUTION

Merge and Append can be done pretty easily through the PQ UI.

 

For Merge, you just need to make sure your Unique ID's truly match...same type and same string.

 

For Append, you ideally want both tables to have columns that match. They don't need to match perfectly, but it starts getting a little weird with how columns get ordered if there aren't a perfect match.

 

flowingbuckle_0-1773253908024.png

 

You can Merge or Append into an existing query, or create a new one.

 

I recommend creating a new one, and then changing the queries that are the source of the Merge/Append to a Connection Only that isn't actually loaded.

View solution in original post

6 REPLIES 6
cengizhanarslan
Super User
Super User

1) Load both worksheets into Power Query

2) Make sure the IP Address columns have the same data type in both tables

3) In Worksheet2, do Merge Queries

4) Match Worksheet2[IP Address] to Worksheet1[IP Address]

5) Choose join type: Left Anti

  • This returns only rows from Worksheet2 that do not exist in Worksheet1

6) Append that result to Worksheet1

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

Thanks, how do I perform step 6, is there an option to Append or manually copy and paste to Worksheet1?

Merge and Append can be done pretty easily through the PQ UI.

 

For Merge, you just need to make sure your Unique ID's truly match...same type and same string.

 

For Append, you ideally want both tables to have columns that match. They don't need to match perfectly, but it starts getting a little weird with how columns get ordered if there aren't a perfect match.

 

flowingbuckle_0-1773253908024.png

 

You can Merge or Append into an existing query, or create a new one.

 

I recommend creating a new one, and then changing the queries that are the source of the Merge/Append to a Connection Only that isn't actually loaded.

Thank you very much for your help, all is now working well.

Hi @Rnaval ,

I would take a moment to thank @flowingbuckle  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions

m_dekorte
Resident Rockstar
Resident Rockstar

Hi @Rnaval,

 

You can try a pattern like this.
This assumes you have two tables in 1 excel workbook, the first table is called _t1 and the second (the table to append to the first) is called _t2. Both these tables have at least 1 column called IP address 

let
    t1 = Excel.CurrentWorkbook(){[Name="_t1"]}[Content],
    t2 = Excel.CurrentWorkbook(){[Name="_t2"]}[Content],
    r = Table.Combine(
        {
            t1,
            Table.RemoveMatchingRows(t2, Table.ToRecords(t1), {"IP address"})
        }
    )
in
    r

 

Or simply append both tables and remove duplicates from the IP address column...
I hope this is helpful

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.