Forum Discussion
Merge 2 tables into one table
- 5 years ago
You can create a new pbix file with these two tables(Merge and NATURALLEFTOUTERJOIN don't support tables from Power BI datasets) and try these steps.
1 Remove ‘company’ column of Table 2 in Power Query
2 Rename the ‘email address’ column of Table 1(NATURALLEFTOUTERJOIN doesn’t support Duplicate column names used for join)
3 Create a Calculated table with NATURALLEFTOUTERJOIN function
Table = VAR join_table = NATURALLEFTOUTERJOIN ( Table2, Table1 ) RETURN SELECTCOLUMNS ( join_table, "first name", [first name], "last name", [last name], "company", [company], "Name", [Name], "country", [country], "email address", [email address] )The result looks like this:
For more details, you can refer the attached pbix file.
Best Regards
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can create a new pbix file with these two tables(Merge and NATURALLEFTOUTERJOIN don't support tables from Power BI datasets) and try these steps.
1 Remove ‘company’ column of Table 2 in Power Query
2 Rename the ‘email address’ column of Table 1(NATURALLEFTOUTERJOIN doesn’t support Duplicate column names used for join)
3 Create a Calculated table with NATURALLEFTOUTERJOIN function
Table =
VAR join_table =
NATURALLEFTOUTERJOIN ( Table2, Table1 )
RETURN
SELECTCOLUMNS (
join_table,
"first name", [first name],
"last name", [last name],
"company", [company],
"Name", [Name],
"country", [country],
"email address", [email address]
)
The result looks like this:
For more details, you can refer the attached pbix file.
Best Regards
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.