Power QueryExercises

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

How to fix it

  1. Check the exact column names in the step before the failing one.
  2. Rename columns once, early, and refer to the new names afterwards.
  3. For optional columns, pass MissingField.UseNull or MissingField.Ignore deliberately.
  4. Prefer rule-based steps (Table.TransformColumnNames) when headers vary.

Find the step that fails

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

Guides

Related lessons

Similar errors