The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
Thanks for looking at post.
I got stuck with below scenario. Any help will be much appreciated.
I have 2 tables,
Table 1: Data coming from excel and have 10 columns and several rows
Table 2: Data coming from SQL and have 3 columns and few 100s of rows
What i need is, any logic to merge two tables. That is, compare table 1 and 2, and if data not available in table 1 from table 2 then add only those data from table 2 to table 1 (for those 3 columns)
Any idea please?
Solved! Go to Solution.
I'm not sure if i got what you a trying to do but try the below steps. I had similar requirement and was able to get it solved with the below steps:
In Power Query Editor, select Table 1.
Click on Home > Merge Queries.
Select Table 2 as the table to merge with.
Choose the columns that are common between the two tables (the columns you want to compare).
Select the Left Anti join. This will return only the rows from Table 2 that do not have a matching row in Table 1 based on the selected columns.
After the merge, you will see a new column with a table icon. Click on the Expand button (two arrows) next to this column.
Select the three columns from Table 2 that you want to add to Table 1.
Go back to the main Power Query Editor window.
Append the non-matching rows from Table 2 to Table 1.
Use Home > Append Queries and append the expanded result to Table 1.
Close and Apply | This process will ensure that only the unique data from Table 2 is added to Table 1.
I'm not sure if i got what you a trying to do but try the below steps. I had similar requirement and was able to get it solved with the below steps:
In Power Query Editor, select Table 1.
Click on Home > Merge Queries.
Select Table 2 as the table to merge with.
Choose the columns that are common between the two tables (the columns you want to compare).
Select the Left Anti join. This will return only the rows from Table 2 that do not have a matching row in Table 1 based on the selected columns.
After the merge, you will see a new column with a table icon. Click on the Expand button (two arrows) next to this column.
Select the three columns from Table 2 that you want to add to Table 1.
Go back to the main Power Query Editor window.
Append the non-matching rows from Table 2 to Table 1.
Use Home > Append Queries and append the expanded result to Table 1.
Close and Apply | This process will ensure that only the unique data from Table 2 is added to Table 1.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
20 | |
19 | |
18 | |
18 | |
14 |
User | Count |
---|---|
38 | |
35 | |
23 | |
20 | |
17 |