Table of contents
TOC
Collapse the table of content
Expand the table of content

Table.Combine

Owen Duncan|Last Updated: 5/22/2018

Table.Combine(tables as list, optional columns as any) as table

About

Returns a table that is the result of merging a list of tables, tables. The resulting table will have a row type structure defined by columns or by a union of the input types if columns is not specified.

Example 1

Merge the three tables together.

Table.Combine({Table.FromRecords({[CustomerID = 1, Name = "Bob", Phone = "123-4567"]}), Table.FromRecords({[CustomerID = 2, Name = "Jim", Phone = "987-6543"] }),Table.FromRecords({[CustomerID = 3, Name = "Paul", Phone = "543-7890"]})})

CustomerIDNamePhone
1Bob123-4567
2Jim987-6543
3Paul543-7890

Example 2

Merge three tables with different structures.

Table.Combine({Table.FromRecords({[Name="Bob",Phone="123-4567"]}), Table.FromRecords({[Fax="987-6543", Phone="838-7171"] }),Table.FromRecords({[Cell = "543-7890"]})})

NamePhoneFaxCell
Bob123-4567
838-7171987-6543
543-7890

Example 3

Merge two tables and project onto the given type.

Table.Combine({Table.FromRecords({[Name="Bob",Phone="123-4567"]}), Table.FromRecords({[Fax="987-6543", Phone="838-7171"] }),Table.FromRecords({[Cell = "543-7890"]})}, {"CustomerID", "Name"})

CustomerIDName
Bob
© 2018 Microsoft