Table.FromColumns Function of Power Query

The Table.FromColumns function returns a table from a list containing nested lists with the column names and values.

Syntax

Table.FromColumns(lists as list, optional columns as any) as table

Example:

Power Query M

let
  MyTable = Table.FromColumns(
    {
      {1, "Ashish", "TCS"}, 
      {2, "Katrina", "Infosys"}, 
      {3, "Alia", "TCS"}}, 
    {"Column1", "Column2", "Column3"}
  )
in
  MyTable  

The output of the above code is shown below:

Table.FromColumns function in Power Query