Table.FromList Function in Power Query

The Table.FromList function in Power Query converts a list into a table by applying the specified splitting function to each item in the list.

Syntax

Table.FromList(
    list as list, 
    optional splitter as nullable function, 
    optional columns as any, 
    optional default as any, 
    optional extraValues as nullable number
) as table    

The function has the following parameters:

Example: Simple List to Table.

Power Query M

let
    MyList = {1, 2, 3, 4},
    ResultTable = Table.FromList(MyList, Splitter.SplitByNothing(), {"Number"})
in
    ResultTable    

The output of the above code is shown below:

Number
1
2
3
4

Example: Split Text Items into Multiple Columns.

Power Query M

let
    MyList = {"Alice,10", "Bob,15", "Charlie,20"},
    ResultTable = Table.FromList(
        MyList,
        Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv),
        {"Name", "Score"}
    )
in
    ResultTable    

The output of the above code is shown below:

Name   Score
Alice   10
Bob   15
Charlie   20

Example: Using Default Value for Missing Split Items.

Power Query M

let
    MyList = {"Alice,10", "Bob"},
    ResultTable = Table.FromList(
        MyList,
        Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv),
        {"Name", "Score"},
        "N/A"
    )
in
    ResultTable   

The output of the above code is shown below:

Name   Score
Alice   10
Bob   N/A