Power Query errors and how to fix them
29 error messages, what each one means, how to find the step that raises it, and a fix you can check. Every example runs in our simulator on each build.
New to debugging? Start with the error triage guide.
Expression.Error
The query logic refers to something that isn't there, or combines values of the wrong type.
- Expression.Error: The column of the table wasn't foundA 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.
- Expression.Error: We cannot apply operator to types Text and NumberAn arithmetic or comparison operator received values of incompatible types. M doesn't convert text to numbers automatically.
- Expression.Error: The name wasn't recognizedM code refers to a step, query or function name that doesn't exist. Usually a step was renamed or deleted, or a function name is misspelled or wrongly capitalised.
- Expression.Error: The key didn't match any rows in the tableA lookup like Source{[Name="Sheet1"]}[Data] found no matching row. Often a sheet, table or file was renamed in the source.
- Expression.Error: There weren't enough elements in the enumerationCode asked for a list item or table row that doesn't exist, such as {0} on an empty list or Table.First of an empty table used later.
- Expression.Error: The field of the record wasn't foundCode reads a field from a record that doesn't have it. In a custom column, [Amount] reads a field of the current row, so the error means the row has no column called Amount at that point.
- Expression.Error: We cannot apply field access to the type[Name] syntax only works on a record (such as a table row). This error means the value in front of it is a number, text or list, typically inside List.Transform where _ is the list item, not a row.
- Expression.Error: The key matched more than one row in the tableA row lookup like Table{[Key = "A"]} requires exactly one matching row. The table has duplicates of that key, so M refuses to guess which row you meant.
- Expression.Error: We cannot convert a value of type Table to type TextA 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.
- Expression.Error: We cannot convert a value of type Record to type TextA text operation received a record, which is what a row or a nested JSON object is. Pick the field you need first.
- Expression.Error: We cannot convert the value to type TextA text function such as Text.Start, Text.Length or Text.Combine received a number. M never converts numbers to text implicitly; you convert explicitly with Text.From.
- Expression.Error: We cannot apply operator & to types Text and Number& joins two texts (or two lists, or two records). When one side is a number or a date, M raises this error instead of converting it for you.
- Expression.Error: We cannot convert the value null to type Logicalif and filter conditions need true or false. When a condition evaluates to null, for example because the column is empty on some rows, if raises this error.
- Expression.Error: We cannot convert the value to type DateA date function such as Date.AddDays or Date.Year received text, not a date. The column still holds text because its type was never changed, or it was changed after this step.
- Expression.Error: The field already exists in the recordA step tried to create a column whose name is already taken: Add Column, Rename, Expand or Promote Headers produced a duplicate name.
- Expression.Error: There were too many elements in the enumeration to complete the operationUsually raised by Pivot Column with "Don't aggregate": two source rows land in the same output cell, and without an aggregation M can't put two values in one cell. The error appears in those cells.
- Expression.Error: We cannot convert a value of type Record to type TableA table function such as Table.Combine received a record (one row) where it needs a table. Lists of records from JSON are the usual source.
- Expression.Error: We cannot convert the value to type TableExpand Table Column (or another table function) met a cell that isn't a table. Mixed nested columns, where some rows hold a table and others a number, text or null-like placeholder, cause it.
- Expression.Error: The name '_' wasn't recognized (missing each)[Column] is shorthand for _[Column], and _ only exists inside each (or a function with a parameter called _). Writing a condition like [Qty] > 0 without each makes M look for _ and fail.
- Expression.Error: A cyclic reference was encountered during evaluationTwo steps or queries depend on each other, directly or through a chain, so neither can be computed first.
- Expression.Error: We cannot convert the value to type FunctionSomething that isn't a function was called with (), or passed where a function is expected. Common when a parameter has the same name as a function, or each was left out of a transform.
- Expression.Error: The 'count' argument is out of rangeText.Range or Text.Middle asked for more characters than the text has from that offset. Fixed-position extraction breaks as soon as one value is shorter than expected.
DataFormat.Error
A value couldn't be converted: usually a type change, a culture mismatch or placeholder text.
- DataFormat.Error: We couldn't convert to NumberText that isn't a number was converted to a number type, such as "n/a", an empty string or a decimal comma read with the wrong culture.
- DataFormat.Error: We couldn't convert to LogicalText was converted to true/false but isn't one of the values M understands. Logical.FromText accepts only "true" and "false" (any case), so Yes/No, Y/N or 1/0 fail.
- DataFormat.Error: We couldn't convert to Whole NumberA value couldn't become an Int64 (whole number): it contains letters, units or a format the culture doesn't read. Each failing cell becomes an error; the rest of the column converts.
- DataFormat.Error: We couldn't parse the input provided as a Date valueText was converted to a date using a culture that reads it differently. 31/12/2026 is valid day-first (en-GB) but not month-first (en-US), where there is no month 31.
- DataFormat.Error: We couldn't parse the input provided as a DateTime valueThe text isn't a date and time the culture recognises. Timestamps from logs and APIs often use formats with a T, a zone suffix or a 24-hour clock that need an explicit culture or format.
Expression.SyntaxError
The M code itself isn't valid, so nothing runs until it's fixed.
- Expression.SyntaxError: Token Comma expectedThe code isn't valid M, so nothing runs. Most often a comma is missing between two steps of a let, or between list or record items. The editor points at the token after the gap.
- Expression.SyntaxError: Token Literal expectedThe parser reached a place where a value should be, such as after an operator or before a closing bracket, and found nothing. Typically an expression was cut off while editing.