Table.FromList Function in Power Query M

Sumit Bansal
Written by

Sumit Bansal is the founder of TrumpExcel.com and a 13-time Microsoft Excel MVP. He started this site in 2013 to share his passion for Excel through easy tutorials, tips, and training videos, helping you master Excel, boost productivity, and maybe even enjoy spreadsheets!

The Table.FromList function in Power Query turns a list into a table. Each item in the list becomes a row, and you can split each item into several columns and name those columns as you go.

This comes up a lot, because many Power Query steps hand you a list, and most of the work you want to do next needs a table.

In this article, I’ll show you how to use Table.FromList with practical examples, like splitting text into columns, building a date table, and dealing with items that have missing or extra values.

Follow along with the example file

Table.FromList Function Examples.xlsx

Download

Table.FromList Function 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
  • list – the list you want to turn into a table, such as {"Apple","Banana"} or a step that returns a list.
  • splitter (optional) – a function that splits each item into the values for its columns. If you leave it out (or use null), each item is treated as text and split at every comma. Use Splitter.SplitByNothing() to keep each item whole.
  • columns (optional) – the column names as a list, such as {"Name","City"}. You can also give a number of columns or a table type. If you leave it out, you get columns named Column1, Column2, and so on.
  • default (optional) – the value to use when an item has fewer values than there are columns. If you leave it out, the empty cells get null. With the default comma splitter, they get empty text instead (more on this in Example 7).
  • extraValues (optional) – what to do when an item has more values than there are columns. Use ExtraValues.Error (the default, which gives an error), ExtraValues.Ignore (drops the extra values), or ExtraValues.List (puts the last column’s value and the extras in a list).

What it returns – a table with one row for each item in the list.

The Table.FromList function works in Power Query in Excel for Microsoft 365, 2024, 2021, 2019, 2016, and Excel for Mac (Microsoft 365), as well as in Power BI.

When to Use the Table.FromList Function

Use this function when you need to:

  • Turn a list from an earlier step into a table you can filter, sort, or merge
  • Split comma-separated text into separate, named columns
  • Split text that uses a different separator, like a pipe or a semicolon
  • Build a calendar or date table from a list of dates
  • Turn a list of records (for example, from a JSON file or a web API) into a table
  • Split a single cell of text from your worksheet into a list of rows

Example 1: Convert a Simple List into a Table

Let’s start with the most basic use, turning a list of text values into a one-column table.

Say you have a list of five products, and you want a table with one column called Product.

In the example file, Examples 1 to 8 are saved as queries, since they don’t need any worksheet data. You can open them from Data > Queries & Connections.

Create a new blank query (in Excel, go to Data > Get Data > From Other Sources > Blank Query) and use this formula in the formula bar:

= Table.FromList({"Laptop Stand","Wireless Mouse","USB-C Hub","Desk Lamp","Webcam"},Splitter.SplitByNothing(),{"Product"})

Result: a table with one column, Product, and five rows (Laptop Stand, Wireless Mouse, USB-C Hub, Desk Lamp, Webcam)

Table.FromList turns the five product names into a one-column table headed Product

Here, the first argument is the list, written inside curly brackets. Splitter.SplitByNothing() tells the function to put each item in the table exactly as it is, and {"Product"} gives the column its name.

If you leave out the column name, Power Query names the column Column1. You can always rename it later with the Table.RenameColumns function, but naming it here saves you a step.

You’ll also see this exact pattern when you click the To Table button on a list in the Power Query Editor. Power Query writes a Table.FromList step with Splitter.SplitByNothing() for you.

Once the list is a table, you can use any table function on it, like the Table.SelectRows function to filter its rows.

Example 2: Split Comma-Separated Text into Columns

Here’s where Table.FromList does more than just convert a list.

Say you have a list of invoice entries where each item holds the invoice number, the customer, and the amount, separated by commas. You want each of those in its own column.

Create a new blank query and use this formula:

= Table.FromList({"INV-2041,Harbor Supply,1250","INV-2042,Pinecrest Dental,480","INV-2043,Bluewater Cafe,2300","INV-2044,Summit Print,915"},null,{"Invoice","Customer","Amount"})

Result: a table with Invoice, Customer, and Amount columns, one row per invoice

The default splitter splits each invoice entry at the commas into Invoice, Customer and Amount columns

Here, the second argument is null, so Table.FromList uses its default splitter. That default treats each item as text and splits it at every comma, and the three column names go to the three pieces in order.

Note that every value comes out as text, including the amounts. If you want to add up the Amount column, change its type to a number first (click the data type icon at the left of the Amount header and choose Decimal Number).

If you’d rather not type names, you can give the number of columns instead, like 3. Power Query then names them Column1, Column2, and Column3.

Splitting with the default comma splitter works well for a list that’s already in your query. If the data is in a CSV file, load it with Data > From Text/CSV instead, which splits and types the columns for you.

Example 3: Keep Text That Has Commas in One Column

The default comma split is handy until your items have commas in them.

Say you have a list of store addresses like “418 Maple Ave, Denver, CO”, and you want each full address in one column.

If you use the default splitter here (null as the second argument) with one column name, you get this error: “DataFormat.Error: There were more columns in the result than expected.” Each address splits into three pieces, but there’s only one column to put them in.

Create a new blank query and use this formula instead:

= Table.FromList({"418 Maple Ave, Denver, CO","72 Harbor Rd, Portland, ME","905 Elm St, Austin, TX","31 Lake Dr, Madison, WI"},Splitter.SplitByNothing(),{"Store Address"})

Result: a table with one Store Address column, with each full address (commas included) in its own row

With Splitter.SplitByNothing, each full store address stays in one Store Address cell, commas included

Here, Splitter.SplitByNothing() stops Table.FromList from splitting anything, so the commas stay inside the text.

Make sure you type the parentheses at the end of Splitter.SplitByNothing(). Without them, you get an error that says “1 arguments were passed to a function which expects 0.”

Example 4: Split Text with a Different Delimiter

Not every list uses commas. Sometimes the values are separated by a pipe, a semicolon, or a tab.

Say you have a list of training courses where the course code, course name, and duration in hours are separated by ” | ” (a space, a pipe, and a space). You want them in three columns.

Create a new blank query and use this formula:

= Table.FromList({"XL-101 | Excel Basics | 6","XL-205 | Pivot Tables | 4","PQ-110 | Power Query Intro | 5","XL-310 | Dashboards | 8"},Splitter.SplitTextByDelimiter(" | "),{"Course Code","Course","Hours"})

Result: a table with Course Code, Course, and Hours columns, one row per course

Splitting on ' | ' gives clean Course Code, Course and Hours columns

Here, Splitter.SplitTextByDelimiter(" | ") splits each item wherever it finds ” | “. Since the spaces are part of the delimiter, the values come out clean, with no extra spaces at the start or end.

The default splitter only looks for commas, so with null here the whole text of each course would land in the first column, with the other two left empty.

The ” | ” delimiter has to match exactly. An item typed as “XL-101|Excel Basics|6″ has no ” | ” in it, so it isn’t split, and its whole text lands in the Course Code column.

If your spacing varies, split on “|” instead. Then select the columns and go to Transform > Format > Trim to remove the extra spaces.

Like in Example 2, the Hours values come out as text, so change the column type before doing any math with them.

Example 5: Create a Date Table from a List of Dates

This next one is something you’ll use when building a calendar table for a report.

Say you want a table with one row for each day in the first week of January 2026, in a column called Date that’s already set to the Date type.

Create a new blank query and use this formula:

= Table.FromList(List.Dates(#date(2026,1,1),7,#duration(1,0,0,0)),Splitter.SplitByNothing(),type table [Date = date])

Result: a table with one Date column holding 1/1/2026 through 1/7/2026

A Date column typed as Date, holding 1/1/2026 through 1/7/2026

Here, the List.Dates function makes a list of seven dates starting on January 1, 2026, one day apart. Table.FromList turns that list into a table, and type table [Date = date] names the column Date and sets its type to Date in the same step.

This works because List.Dates already returns real dates, so the Date type matches the values.

The dates show in your computer’s regional date format, so a UK machine shows 01/01/2026 for the first row. The value underneath is the same date either way.

You need Splitter.SplitByNothing() here because the items are dates, not text. With the default splitter, Power Query tries to treat each date as text and gives this error: “We cannot convert the value #date(2026, 1, 1) to type Text.”

Important: A table type labels the column types but doesn’t convert the values. If you used type table [Invoice = text, Customer = text, Amount = number] in Example 2, Amount would still hold text, so change types in a separate step.

Follow along with the example file

Table.FromList Function Examples.xlsx

Download

Example 6: Convert a List of Records into a Table

Data from a JSON file or a web API often arrives as a list of records, where each record is one row with named fields.

Say you have a list of four employee records, each with a Name, Department, and Extension field, and you want a regular table with those three columns.

Create a new blank query and use this formula:

= Table.FromList({[Name="Amanda Warren",Department="Finance",Extension=214],[Name="Eric Sanders",Department="IT",Extension=305],[Name="Regina Peterson",Department="Sales",Extension=118],[Name="Addison Bailey",Department="HR",Extension=402]},Record.FieldValues,{"Name","Department","Extension"})

Result: a table with Name, Department, and Extension columns, one row per employee

Record.FieldValues puts each record's values into Name, Department and Extension columns

Here, the Record.FieldValues function works as the splitter. It takes each record and returns its values as a list, and those values go into the Name, Department, and Extension columns in order.

The default splitter can’t do this, because it only works on text. If you leave the second argument as null, you get the error “We cannot convert a value of type Record to type Text.”

Important: Record.FieldValues goes by position, not by field name. If one record lists its fields in a different order, its values land in the wrong columns, so use the Table.FromRecords function when the field order isn’t guaranteed.

Example 7: Fill Missing Values with a Default

Real lists aren’t always tidy. Some items have fewer values than others.

Say you have a list of contacts with a name, team, and phone number, but two of them have no phone number. You want those empty spots to say “Not given”.

Create a new blank query and use this formula:

= Table.FromList({"Alyssa Robinson,Sales,555-0142","Madison Thomas,Support","Carlos Martin,Marketing,555-0187","Christina King,Sales"},Splitter.SplitTextByDelimiter(","),{"Name","Team","Phone"},"Not given")

Result: a table with Name, Team, and Phone columns, where the Phone cell shows Not given for Madison Thomas and Christina King

Contacts with no phone number get Not given in the Phone column

Here, the fourth argument, “Not given”, is the default. Madison Thomas and Christina King’s items split into only two values, so the third column gets the default instead.

Notice that I used Splitter.SplitTextByDelimiter(",") here and not null. The default splitter fills the missing spots with empty text, so the default value never shows up, and you’d see blank Phone cells instead.

Example 8: Ignore Extra Values in Some Items

The opposite problem is an item with more values than you have columns.

Say you have a product export where each item has a SKU, product name, and category, but some items also have extra tags at the end (like Clearance or Bestseller). You only want the first three values.

Create a new blank query and use this formula:

= Table.FromList({"SKU-301,Desk Lamp,Office","SKU-302,Stapler,Office,Clearance","SKU-303,Monitor Arm,Furniture,New,Bestseller","SKU-304,Whiteboard,Office"},null,{"SKU","Product","Category"},null,ExtraValues.Ignore)

Result: a table with SKU, Product, and Category columns, one row per product, with the extra tags dropped

ExtraValues.Ignore keeps SKU, Product and Category and drops the extra tags

Here, ExtraValues.Ignore tells the function to keep the first three values of each item and drop the rest. The fourth argument is null because there’s no default to set.

The dropped tags (Clearance, New, and Bestseller) are gone from the result, and Power Query doesn’t warn you about it. So use this only when you’re sure you don’t need the extra values.

Without the fifth argument, Table.FromList uses ExtraValues.Error, and you get the “There were more columns in the result than expected” error, because some items have more than three values.

If you want to keep the extra tags, use ExtraValues.List instead. The Category column then holds a list for each row (the category plus any extra tags), which you can expand or combine later.

Example 9: Split a Cell from Your Worksheet into Rows

So far, every list was typed into the formula. In real work, the list usually comes from your data.

Below is a project table where all the team members are typed in one cell, separated by commas, and I want each member in their own row in a Member column.

A project table with all four team members typed in one Members cell

To follow along, select any cell in the table and go to Data > From Table/Range to open it in the Power Query Editor. If Power Query adds a Changed Type step, use #"Changed Type" in place of Source in the formula below.

Add a new step (by clicking on the fx icon next to the formula bar) and use this formula:

= Table.FromList(Text.Split(Source{0}[Members],", "),Splitter.SplitByNothing(),{"Member"})

Result: a table with one Member column and four rows (Charles Turner, Ethan Palmer, Tyler Jones, Gabriel Campbell)

Each team member from the Members cell is now its own row in the Member column

Here, Source{0}[Members] picks the Members cell from the first row of the table. The Text.Split function then splits that text at each comma and space, which gives a list of four names.

Table.FromList turns that list into a table, one name per row. I split with Text.Split first because the default splitter would put each name in its own column, not its own row.

This pattern is meant for one cell. If your table has many projects, each with its own members, select the Members column and use Split Column > By Delimiter, then choose Rows under Advanced options, so each member stays next to their project.

Other Excel Articles You May Also Like:

All Power Query Functions

Sumit Bansal

Sumit Bansal

13x Microsoft Excel MVP

Hey! I'm Sumit Bansal, founder of trumpexcel.com and a Microsoft Excel MVP. I started this site in 2013 because I genuinely love Microsoft Excel (yes, really!) and wanted to share that passion through easy Excel tutorials, tips, and Excel training videos. My goal is straightforward: help you master Excel skills so you can work smarter, boost productivity, and maybe even enjoy spreadsheets along the way!

Get the FREE 51 Excel Tips Ebook

Enter your details and the free PDF is on its way to your inbox.

Hmm, that didn't go through. Please check your email and try again.

No spam. You'll also get my weekly Excel newsletter. Unsubscribe anytime.

Check your inbox!

The ebook is on its way to your email. It usually lands within a couple of minutes.