Record.ToTable Function in Power Query

The Record.ToTable function takes a single record as its input and returns a table that has two columns Name and Value. The Name column contains the field names and Values column contains the corresponding values for the field names from an input record.

Syntax

Record.ToTable(record as record) as table

The function accepts only one argument i.e., the record to convert and returns a table

Example: Return the table from the record.

Power Query M

let
  source = [CustomerID = 1, Name = "Ashish", Phone = "123-4567"], 
  Return = Record.ToTable(source)
in
  Return 

The output of the above code is shown below:

Record.ToTable function in Power Query