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

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

Reply
Henry1943
Frequent Visitor

How to combine two table into one

I want to combine the two table as below:

Table 1

Product nameversiondateQuantity1Quantity2
H12317/7/20173 
H12327/8/20171 
H1241 1 
H12517/11/201733
H12617/12/20172 
H1271 1 
H12817/15/201711

 

Table 2

Product nameversiondateQuantity1Quantity2
H12317/7/201733
H1232 11
H12417/9/201711
H1251 33
H1261 22
H12717/14/201711
H12817/15/201711

 

I want to get the table after combine as below

Product nameversiondateQuantity1Quantity2
H12317/7/201733
H12327/8/201711
H12417/9/201711
H12517/11/201733
H12617/12/201722
H12717/14/201711
H12817/15/201711

 

 

How could I get that?

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Henry1943,

1. I create a unique calculated column using the formulas. And create relationship between the two tables.

Column = Table1[Product name]&Table1[version]
Column = Table2[Product name]&Table2[version]


2. In table1, create calculated column using the formulas.

New Date = IF(ISBLANK(Table1[date]),RELATED(Table2[date]),Table1[date])
New Quantity2 = IF(ISBLANK(Table1[Quantity2]),RELATED(Table2[Quantity2]),Table1[Quantity2])


3. Create a new table by clicking "New Table" under Modeling on Home page.

Result = SELECTCOLUMNS(Table1,"Product name",Table1[Product name],"version",Table1[version],"date",Table1[New Date],"Quantity1",Table1[Quantity1],"Quantity2",Table1[New Quantity2])

Please see the expected result.

1.PNG

Please download the attached file to test.

Best Regards,
Angelia

View solution in original post

1 REPLY 1
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Henry1943,

1. I create a unique calculated column using the formulas. And create relationship between the two tables.

Column = Table1[Product name]&Table1[version]
Column = Table2[Product name]&Table2[version]


2. In table1, create calculated column using the formulas.

New Date = IF(ISBLANK(Table1[date]),RELATED(Table2[date]),Table1[date])
New Quantity2 = IF(ISBLANK(Table1[Quantity2]),RELATED(Table2[Quantity2]),Table1[Quantity2])


3. Create a new table by clicking "New Table" under Modeling on Home page.

Result = SELECTCOLUMNS(Table1,"Product name",Table1[Product name],"version",Table1[version],"date",Table1[New Date],"Quantity1",Table1[Quantity1],"Quantity2",Table1[New Quantity2])

Please see the expected result.

1.PNG

Please download the attached file to test.

Best Regards,
Angelia

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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