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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

How can I append or merge two tables with different number of columns?

How can I append or merge two tables with different number of columns?

 

I  know theres a straightforward way to do it which is in Advace Query Editor using 'Append' funcitonality but correct me If I am wrong, performance will suffer if I'll do it that way. I notice its takes so much time refreshing the data whenever I made my changs in advance query editor. 

 

I was thinking if theres a way in doing it using PBI DAX, the report will refresh or load faster.

 

Any thoughts please? Thanks in advance!

1 ACCEPTED SOLUTION


@junyetzotomayor wrote:

How can I append or merge two tables with different number of columns?

 

I  know theres a straightforward way to do it which is in Advace Query Editor using 'Append' funcitonality but correct me If I am wrong, performance will suffer if I'll do it that way. I notice its takes so much time refreshing the data whenever I made my changs in advance query editor. 

 

I was thinking if theres a way in doing it using PBI DAX, the report will refresh or load faster. I tried UNION but its thrwoing an error since I have different number of columns. 

 

Any thoughts please? Thanks in advance!


@junyetzotomayor

Both way in Power Query or in DAX.

Table =
UNION (
    SELECTCOLUMNS ( Table1, "column1", Table1[column1], "column2", Table1[column2] ),
    SELECTCOLUMNS ( Table2, "column1", Table2[Column1], "column2", Table2[Column4] )
)

By the way, how much data in your case? I'd doubt you'll still experience performance issue if the data is too huge.

View solution in original post

2 REPLIES 2

How can I append or merge two tables with different number of columns?

 

I  know theres a straightforward way to do it which is in Advace Query Editor using 'Append' funcitonality but correct me If I am wrong, performance will suffer if I'll do it that way. I notice its takes so much time refreshing the data whenever I made my changs in advance query editor. 

 

I was thinking if theres a way in doing it using PBI DAX, the report will refresh or load faster. I tried UNION but its thrwoing an error since I have different number of columns. 

 

Any thoughts please? Thanks in advance!


@junyetzotomayor wrote:

How can I append or merge two tables with different number of columns?

 

I  know theres a straightforward way to do it which is in Advace Query Editor using 'Append' funcitonality but correct me If I am wrong, performance will suffer if I'll do it that way. I notice its takes so much time refreshing the data whenever I made my changs in advance query editor. 

 

I was thinking if theres a way in doing it using PBI DAX, the report will refresh or load faster. I tried UNION but its thrwoing an error since I have different number of columns. 

 

Any thoughts please? Thanks in advance!


@junyetzotomayor

Both way in Power Query or in DAX.

Table =
UNION (
    SELECTCOLUMNS ( Table1, "column1", Table1[column1], "column2", Table1[column2] ),
    SELECTCOLUMNS ( Table2, "column1", Table2[Column1], "column2", Table2[Column4] )
)

By the way, how much data in your case? I'd doubt you'll still experience performance issue if the data is too huge.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.