Record.ToTable is a Power Query M function that converts a record into a table with columns “Name” and “Value”. The function returns a table containing a row for each field in the input record with the field name and value
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Record.ToTable( record as record ) as table
Description
Returns a table containing the columns Name
and Value
with a row for each field in record
.
Examples
Return the table from the record.
Record.ToTable( [OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0] )
/* Output:
Table.FromRecords( {
[Name = "OrderID", Value = 1],
[Name = "CustomerID", Value = 1],
[Name = "Item", Value = "Fishing rod"],
[Name = "Price", Value = 100]
} )
*/
Related functions
Other functions related to Record.ToTable are:
