Power QueryExercises

Expression.Error: We cannot convert a value of type Table to type Text

By Tahir Nas · Examples run in our simulator · Updated

Expression.Error: We cannot convert a value of type Table to type Text.

A text function received a whole table. Usually a step returns a table where you expected one cell, for example after a filter that should have picked a single value.

Common causes

How to fix it

  1. Drill down to the value: Table{0}[Column] or Table[Column]{0}.
  2. For a single-value query, right-click the cell and Drill Down so the query returns the value.
  3. Expand or aggregate nested table columns before using them as text.

Find the step that fails

Minimal example

Raises the error:

Text.Upper(#table({"Region"}, {{"north"}}))

Fixed:

Text.Upper(#table({"Region"}, {{"north"}}){0}[Region])

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

Related lessons

Similar errors