Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello to all,
I have 2 tables with some headers in common (not all of them).
How can I join both tables in a single table that shows all headers between Table1 and Table2 locating the values in corresponding position and empty if there is no value like Output table below.
Table1:
Type | CustomerID | Name.1 | Name.2 | Phone | City | State |
A | 21 | Bob | 123-4567 | A | X | |
A | 13 | J | m | 987-6543 | F | Y |
A | 30 | Paul | 543-7890 | D | W | |
A | 52 | Cr | st | 232-1550 | C | Z |
Table2:
Type | CustomerID | Phone | State | Country |
B | 48 | 2100-98 | K | Y |
B | 9 | 93-993 | T | P |
Output:
Type | CustomerID | Name.1 | Name.2 | Phone | City | State | Country |
A | 21 | Bob | 123-4567 | A | X | ||
A | 13 | J | m | 987-6543 | F | Y | |
A | 30 | Paul | 543-7890 | D | W | ||
A | 52 | Cr | st | 232-1550 | C | Z | |
B | 48 | 2100-98 | K | Y | |||
B | 9 | 93-993 | T | P |
Thanks for any help.
Solved! Go to Solution.
Hi @cgkas
You can directly use Append in Power Query Editor. It will provide the exact result you are looking for.
let
Source = Table.Combine({Table1, Table2})
in
Source
For DAX, you will need to create Virtual tables using AddColumn, SelectColumn functions to make columns equal in both tables before using Union function.
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.
Hi @cgkas
You can directly use Append in Power Query Editor. It will provide the exact result you are looking for.
let
Source = Table.Combine({Table1, Table2})
in
Source
For DAX, you will need to create Virtual tables using AddColumn, SelectColumn functions to make columns equal in both tables before using Union function.
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.
workaround will be to add 2 blank coloumns with value null in your table 2 & arrange there order, so that it exactly looks like the your 1st table.
then you can append that
let me know if that helps, if yes kindly accept this as solution