Record.FromList
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a record from a list of field values and a set of field names.
Record.FromList(list as list, fields as any) as record
| Argument | Description |
|---|---|
| list | The list of values in the record to check. |
| fields | The set of fields corresponding to the values. The fields can be specific either by a list of text values or a record type. |
- An Expression.Error is thrown if the fields are not unique.
Record.FromList
(
{1, "Bob", "123-4567"},
type [CustomerID = number, Name = text, Phone = number]
)
equals [CustomerID = 1, Name = "Bob", Phone = "123-4567"]
| OrderID | 1 |
| Name | Bob |
| Phone | 123-4567 |
Show: