Table.ToColumns

Generates a hierarchical structure of nested lists based on the contents of the table named "table." Each nested list represents a row of the table, with each item within the list corresponding to a c...

Syntax

Table.ToColumns(table as table) as list

About

Generates a hierarchical structure of nested lists based on the contents of the table named "table." Each nested list represents a row of the table, with each item within the list corresponding to a column value.

Explanation

Generate a list of values from the columns in the table using Power Query M function ToColumns(). Use Table.FromRecords() to create a table with specified values for CustomerID, Name, and Phone. The output is a list of values: {{1, 2}, {"Bob", "Jim"}, {"123-4567", "987-6543"}}.