Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power Query Table.Column: How to Use It

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The Table.Column function in Power Query returns a single column from a table as a list. You use it when you need to grab one column's values—for example, to pass them to a function that expects a list, such as List.Sum, List.Distinct, or Text.Combine. The syntax is Table.Column(table as table, column as text) as list, where table is the table and column is the exact column name as text. It is not a way to remove other columns or reshape a table; it extracts values only. To use it, you need a table already loaded in Power Query (from Excel, a CSV, a database, or another query) and you need to know the exact column header, including spaces and capitalization.

What You'll Need

  • Power Query available in Excel (Data > Get & Transform Data) or Power BI Desktop (Transform data). Menu labels can differ slightly by version, device, or region.
  • A table loaded into the Power Query Editor. This can be an Excel table, a CSV file, a database table, or the output of another query.
  • The exact column name as it appears in the header row. Spaces, punctuation, and capitalization matter.
  • Basic familiarity with the formula bar and the Advanced Editor, since Table.Column is usually written as a custom step.

Step-by-Step

  1. Load your data into Power Query. In Excel, select your table and go to Data > From Table/Range. In Power BI Desktop, use Home > Transform data to open the Power Query Editor. Confirm the data appears in the editor with a header row.
  2. Identify the exact column name. Click the column header in the preview. The name shown in the formula bar or the Applied Steps pane is what you must use. If the header contains spaces, you will wrap the name in double quotes inside the formula, for example "Order Date".
  3. Add a custom step. Go to Home > Advanced Editor (or right-click a step and choose Advanced Editor). Locate the step where your table is available—often the previous step name such as Source or Changed Type. You will add a new line that references that step.
  4. Write the formula. Use the pattern Table.Column(PreviousStepName, "ColumnName"). For example, if your previous step is called Source and the column is Region, write Table.Column(Source, "Region"). Assign it a step name, for example RegionList = Table.Column(Source, "Region").
  5. Close the Advanced Editor and check the result. The step will return a list, shown in the preview as a list of values rather than a table. This is expected; Table.Column always returns a list.
  6. Use the list in a follow-up step. Common uses include List.Sum(RegionList) for a total, List.Distinct(RegionList) for unique values, or Text.Combine(RegionList, ", ") to join values into a single string. Add these as further steps in the Advanced Editor or via the formula bar.
  7. Convert back to a table if needed. If you need the list as a one-column table, wrap it with Table.FromList(RegionList, Splitter.SplitByNothing(), {"Region"}). This is useful when you want to merge or append the extracted column separately.
  8. Apply and close. In Excel, choose Home > Close & Load to send the result to a worksheet or the data model. In Power BI, choose Home > Close & Apply. Review the output to confirm the list or table contains the expected values.

Common Mistakes

  • Using the wrong column name. Table.Column is case-sensitive in practice and will error if the name does not match exactly, including trailing spaces. Copy the header text rather than retyping it.
  • Expecting a table back. The function returns a list, not a table. If you need a table, wrap the result with Table.FromList or use Table.SelectColumns instead.
  • Referencing the wrong step. The first argument must be the step name that produces the table, not the original query name. Check the Applied Steps pane for the correct step label.
  • Forgetting quotation marks. Column names are text and must be in double quotes. Without them, Power Query treats the name as an identifier and throws an error.
  • Using it to remove columns. If your goal is to keep only one column in the table, use Table.SelectColumns or right-click the column and choose Remove Other Columns. Table.Column does not change the table shape.

Tips

  • Name your steps clearly in the Applied Steps pane so you can reference them easily in formulas. A step called Source is fine, but SalesTable is clearer when several tables are involved.
  • Use List.Distinct on the extracted list to quickly see unique values in a column without building a pivot.
  • Combine Table.Column with List.Count to check for blank or missing values before loading data.
  • If the column name might change, consider renaming the column to a stable, space-free name earlier in the query so the formula does not break.
  • Test the formula on a small sample first. A list with thousands of values can be slow to preview in the editor.

Troubleshooting

If you see an error such as "The column 'X' of the table wasn't found," the column name does not match. Open the table preview, click the header, and copy the exact name. Check for leading or trailing spaces and capitalization differences. If the error mentions the step name, confirm the first argument points to a step that returns a table, not a list or a scalar value.

If the preview shows a list but your downstream step fails, check that the downstream function accepts a list. Functions like Table.RowCount expect a table, not a list; use List.Count for lists instead. If the list contains errors, expand the list preview to see which values are failing—often blanks or type mismatches from the source data.

If the query is slow, reduce the number of rows before extracting the column, or disable background previews in the editor options. If the column name contains special characters, keep the double quotes and escape any internal quotes with two double quotes.

If the result is empty, confirm the source table actually has rows and that the column is not entirely null. Check the previous step's output before adding Table.Column.

Frequently Asked Questions

What does Table.Column return?

It returns a list of the values in the specified column, in row order. It does not return a table.

Can I use Table.Column to keep only one column?

No. To keep only one column, use Table.SelectColumns or right-click the column and choose Remove Other Columns. Table.Column extracts values as a list without changing the table.

Is Table.Column case-sensitive?

Yes, the column name must match exactly, including capitalization, spaces, and punctuation. Copy the header text to avoid errors.

How do I turn the list back into a table?

Wrap the result with Table.FromList, for example Table.FromList(MyList, Splitter.SplitByNothing(), {"Column1"}).

Why does my formula say the column was not found?

The name in the formula does not match the actual header. Check for extra spaces, different capitalization, or a renamed column in an earlier step.

Can I reference a column by position instead of name?

Not with Table.Column; it requires the column name as text. If you need positional access, use Table.ColumnNames to get the list of names and then index it.