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

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

Reply
jinweitan
Frequent Visitor

Combine two tables creating more rows and columns

Hi,

 

I am trying to combine two tables where:

 

Table 1:

IDQuestion 1Question 2
1AA
2BA

 

Table 2:

IDQuestion 3Question 4
3BC
4CA

 

And hoping to get a result of this:

IDQuestion 1Question 2Question 3Question 4
1AA  
2BA  
3  BC
4  CA

 

Wonder if I can get any advice on this.

 

Many thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jinweitan , Append in power Query

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Video -https://youtu.be/KyXIDInZMxk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@jinweitan , Append in power Query

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Video -https://youtu.be/KyXIDInZMxk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
FrankAT
Community Champion
Community Champion

Hi @jinweitan 

you can do it with Power Query like this:

 

// Table 1
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXIE41idaCUjIMsJwosFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"Question 1" = _t, #"Question 2" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Question 1", type text}, {"Question 2", type text}}),
    #"Appended Query" = Table.Combine({#"Changed Type", #"Table 2"})
in
    #"Appended Query"

// Table 2
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlbSUXICYmelWJ1oJRMwS0fJUSk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"Question 3" = _t, #"Question 4" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Question 3", type text}, {"Question 4", type text}})
in
    #"Changed Type"

 

08-09-_2020_17-33-25.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

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.