Table.ExpandTableColumn

The function is designed to split tables contained in a specific column into multiple rows and columns. By specifying the columnNames parameter, users can indicate which columns should be expanded fro...

Syntax

Table.ExpandTableColumn(table as table, column as text, columnNames as list, optional newColumnNames as nullable list) as table

About

The function is designed to split tables contained in a specific column into multiple rows and columns. By specifying the columnNames parameter, users can indicate which columns should be expanded from the inner table. To prevent any conflicts between the original and newly created columns, users can provide newColumnNames as a parameter.

Explanation

Enhance the table columns within [a] in the table ({[t = {[a=1, b=2, c=3], [a=2,b=4,c=6]}, b = 2]}) by splitting them into three separate columns named [t.a], [t.b], and [t.c]. This can be achieved using Power Query MTable.ExpandTableColumn function by specifying the source table, the column to expand, the new column names, and the desired output. The resulting table will have the expanded columns along with the original column [b], as shown in the output Table.FromRecords.