Table.ToRecords
Each row of a table as a record, in a list; the column names become the field names.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.ToRecords(table as table) as list
| Parameter | Type | Description |
|---|---|---|
table | table | The table to take apart. |
Returns
list. A record per row, in the table's order.
Remarks
Table.FromRecordsbuilds a table from such a list again.
Examples
Two rows, two records
Table.ToRecords(#table({"Product", "Price"}, {{"Chair", 50}, {"Desk", 120}}))
{[Product = "Chair", Price = 50], [Product = "Desk", Price = 120]}