Expression.Error: The column of the table wasn't found
By Tahir Nas · Examples run in our simulator · Published · Updated
Expression.Error: The column 'Qty' of the table wasn't found.
A step refers to a column name that doesn't exist at that point in the query. Fix the name, the step order, or the source export that changed its headers.
Common causes
- The auto-generated Changed Type step lists every column by name. When the source renames or drops one, that step fails first, even though you never touched it.
- The source renamed or removed a column (schema drift).
- A different capitalisation or a trailing space: Qty, qty and "Qty " are three different names.
- An earlier step removed or renamed the column.
- Headers weren't promoted, so columns are still Column1, Column2…
- A merge or expand step created the column with a prefix, such as Customers.Name.
How to fix it
- Check the exact column names in the step before the failing one.
- Rename columns once, early, and refer to the new names afterwards.
- For optional columns, pass MissingField.UseNull or MissingField.Ignore deliberately.
- Prefer rule-based steps (Table.TransformColumnNames) when headers vary.
Find the step that fails
- Excel: Data → Queries & Connections, right-click the query → Edit, then click each step in Applied Steps from the top. The first step with a yellow warning is the one to fix; it's very often Changed Type.
- Power BI Desktop: Transform data, select the query, and walk the Applied Steps the same way. The formula bar shows the exact column list the step expects.
- Advanced Editor: search for the column name in quotes. Every step that mentions it is a candidate, and the Changed Type step usually lists all of them.
Minimal example
Raises the error:
Table.SelectColumns(#table({"qty"}, {{1}}), {"Qty"})Fixed:
Table.SelectColumns(#table({"qty"}, {{1}}), {"qty"})Both snippets are run by the Power Query Exercises simulator on every build: the first must raise Expression.Error, the second must run.
Practise avoiding it
- beginner~5 minFree
Keep only the columns a report needs (kite shop)
Choose OrderID, Customer and Qty so the report stays the same shape even when the export gains new columns.
- beginner~5 minFree
Remove salary and email before sharing a roster (logistics)
Share a staff list with managers without salary or email columns.
- beginner~5 minFree
Duplicate a column before changing it (logistics)
IT wants a lower-case Login built from Email, while HR needs the Email column left exactly as typed.
- intermediate~7 minFree
Choose columns when one of them is optional (kite shop)
Some exports include a Notes column and some don't. Keep the same four columns either way.
Guides
- Resolve Expression.Error in Power Query: a field guide
- Power Query error messages: a triage map
- Refresh-proof Power Query: a 15-point checklist
Related lessons
- Choose Columns vs Remove Columns
- Dynamic steps that survive new columns
- When a column goes missing: MissingField options
- Combine files whose columns differ