OpenBI Docs Buy

Table.FromRows

Makes a table from lists, each list a row.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.FromRows(rows as list, optional columns as any) as table
ParameterTypeDescription
rowslistThe rows, each a list of values in column order.
columnsany
optional
The column names as a list, a number of columns, or a table type; Column1, Column2 and so on when left out.

Returns

table. A table with one row per list.

Examples

With column names

Table.FromRows({{"Chair", 50}, {"Desk", 120}}, {"Product", "Price"})
ProductPrice
Chair50
Desk120

With a table type

Table.Schema(Table.FromRows({{"Chair", 50}}, type table [Product = text, Price = number]))[[Name], [Kind]]
NameKind
Producttext
Pricenumber

Table.FromColumns, Table.FromRecords, Table.ToRows, #table.

Last updated · OpenBI Studio 0.3.79