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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to combine tables and create a new one

I have two tables that I want to combine in power BI. 

 

 

 

table 1:

ID	Color1		 Color2
1	red	    blue
2	black   brown	
3	yellow	pink

table 2:

ID	Car Model		Color
1	BMW				Black	
2	Honda			Brown
3	Mazda			White

Combined Table:

ID	   Color1	   Color2   ID		    Car Model    Color		Data Source
1	    red	        blue    Blank		Blank	     Blank 		table 1
2	   black		brown	Blank		Blank		 Blank		table 1
3	   yellow		pink	Blank		Blank		 Blank		table 1
Blank   Blank		Blank	1			BMW			 Black		table 2
Blank	Blank		Blank	2			Honda		 Brown		table 2
Blank	Blank		Blank	3			Mazda		 White		table 2

 

 

 

Can anyone please help me if we can merge two tables and create a combined table like above? I could do this with out PBI environment but I my data needs to be automated.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Step1:

Since there can't be duplicate column name in the table, you will need to rename the "ID" in table2 as "ID2".

Step2:

Add custom column for both tables to mark then as table1 and table2.

13.PNG

Stpe3:

Append two tables as new.

https://docs.microsoft.com/en-us/power-query/append-queries 

14.PNG

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Step1:

Since there can't be duplicate column name in the table, you will need to rename the "ID" in table2 as "ID2".

Step2:

Add custom column for both tables to mark then as table1 and table2.

13.PNG

Stpe3:

Append two tables as new.

https://docs.microsoft.com/en-us/power-query/append-queries 

14.PNG

 

Best Regards,

Jay

Anand24
Super User
Super User

Hi @Anonymous ,

 

Here's what I did:

In Power Query Editor:

Step 1: Add column "Custom1" in Table1 with static value = 1

Step 2: Add column "Custom2" in Table2 with static value = 2

Step 3: Perform "Merge As New" operation for (Full Outer Join) both tables on Custom1 = Custom2

Step 4: Add an additional conditional column for identifying data source

Step 5(Optional): Remove Custom1 and Custom2

 

PFA pbix. Go to Power Query and view the steps.

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors