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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
kesham
Frequent Visitor

add rows from multiple table with same type

Hello everyone, I am new in power bi and I try to make a table combining rows of 2 table:

for example :

table 1 (column A,B & C) where A is strings, B & C are int with 1000 rows

table 2(column D & E) where D is string and E is int with 500 rows

 

What I want il making the table 3 with 2 columns (F & G) where F is string and G is int with all the rows ofcouples A&B, A&C, D&E.

At the end Table 3 will have 2500 rows

 

Can someone help me ?

kind regards

 

PS: it would be awesom to know from where is the data with a new strin column H with 3 cases ("Table1 A&B";"Table1 A&C";"Table2 D&E") just to know where the data is from.

 

kind regards again 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@kesham - You could combine tables in 3 ways:

1. Prior to bringing in to Power BI

2. In Power Query -

  2.1 Make a Duplicate of Table1

  2.2 Remove B from one of the tables and C from the other.

  2.3 Change column names so that all 3 tables have the same column names.

  2.4 Add a Custom Column to each of the 3 tables, describing the source.

  2.5 Append tables together into 1.

3. In DAX: Create a Calculated Table like this:

My Combined Table =
var a = SELECTCOLUMNS(Table1,"F",[A],"G",[B],"H","Table1 A&B")
var b = SELECTCOLUMNS(Table1,"F",[A],"G",[C],"H","Table1 A&C")
var c = SELECTCOLUMNS(Table2,"F",[D],"G",[E],"H","Table2")
return UNION(a,b,c)
 
Cheers!
Nathan

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@kesham - You could combine tables in 3 ways:

1. Prior to bringing in to Power BI

2. In Power Query -

  2.1 Make a Duplicate of Table1

  2.2 Remove B from one of the tables and C from the other.

  2.3 Change column names so that all 3 tables have the same column names.

  2.4 Add a Custom Column to each of the 3 tables, describing the source.

  2.5 Append tables together into 1.

3. In DAX: Create a Calculated Table like this:

My Combined Table =
var a = SELECTCOLUMNS(Table1,"F",[A],"G",[B],"H","Table1 A&B")
var b = SELECTCOLUMNS(Table1,"F",[A],"G",[C],"H","Table1 A&C")
var c = SELECTCOLUMNS(Table2,"F",[D],"G",[E],"H","Table2")
return UNION(a,b,c)
 
Cheers!
Nathan

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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