Table.FromList
TableConverts a list to a table by applying a splitter function to each element.
Syntax
Table.FromList(list as list, optional splitter as nullable function, optional columns as any, optional default as nullable any, optional extraValues as nullable number) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
list | list | Yes | The list to convert. |
splitter | function | No | A function that splits each list item into column values. Defaults to Splitter.SplitByNothing(). |
columns | any | No | Column names, a table type, or a list of {name, type} pairs. |
default | any | No | Default value for missing columns when a row has fewer values than expected. |
extraValues | number | No | Specifies how extra values beyond the expected column count are handled. |
Return Value
table — A table derived from the supplied list.
Remarks
Table.FromList is the standard way to convert a list of values into a table. The splitter parameter determines how each list element maps to columns:
Splitter.SplitByNothing()(default) — each element becomes the single value inColumn1. UseTable.ExpandRecordColumnafterwards if elements are records.Splitter.SplitByComma()— splits text by comma into multiple columns.Splitter.SplitTextByDelimiter(...)— splits by any delimiter.
Examples
Example 1: Convert a list of numbers to a single-column table
Table.FromList({1, 2, 3, 4, 5}, Splitter.SplitByNothing(), {"Number"})Output
Number | |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
Example 2: Split comma-delimited strings into columns
Table.FromList(
{"Alice,30,Engineer", "Bob,25,Designer"},
Splitter.SplitByComma(),
{"Name", "Age", "Role"}
)Output
Name | Age | Role | |
|---|---|---|---|
| 1 | Alice | 30 | Engineer |
| 2 | Bob | 25 | Designer |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks