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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
braulio
Frequent Visitor

table combine

Hi,

Is it possible to combine two tables with the same structure but different column names without having to rename the columns so that they remain the same?

= Table.Combine({#"primer bloque", #"segundo bloque", #"tercer bloque"}), this syntax requires column names to be the same.

 

Tks

1 ACCEPTED SOLUTION

let
    Source = List.Zip({Table.ColumnNames(Table2),Table.ColumnNames(Table1)}),
    Result = Table1 & Table.RenameColumns(Table2,Source)
in
    Result

View solution in original post

6 REPLIES 6
v-kongfanf-msft
Community Support
Community Support

Hi @braulio ,

 

You can first use append to form a new table, and then use the merge column function to generate new columns. Finally, delete the redundant columns.

vkongfanfmsft_0-1712801844417.png

vkongfanfmsft_1-1712801887305.png

vkongfanfmsft_2-1712801918426.png

vkongfanfmsft_3-1712801934488.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Adamk, tks, it works, but I have 50 tables with 48 vars each one, I'll keep it in mind.

Tks

lbendlin
Super User
Super User

this syntax requires column names to be the same.

That is incorrect.  There is no requirement that the column names need to be the same.  Table.Combine can append tables even if they have no columns in common.

 

 

Is it possible to combine two tables with the same structure but different column names

 

You can impose the column names of one table onto the other table (for example via Table.RenameColumns), and then append them.

Hi Ibendlin,  sorry but I was reading and trying and the columns has to have the same name.

I know I can rename the columns but I have 50 tables with 48 columns each one, It is possible but it seems a bit inefficient  and difficult to maintain.

 

If you have a syntaxis to combine two tables with same structure but different columns name please share it!!

 

let
    Source = List.Zip({Table.ColumnNames(Table2),Table.ColumnNames(Table1)}),
    Result = Table1 & Table.RenameColumns(Table2,Source)
in
    Result

great!

tks a lot!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors