MetricSign
EN|NLRequest Access
High severityquery

Power BI Refresh Error:
MULTI_VALUE_SUBQUERY_ERROR

What does this error mean?

A scalar subquery (used in a position that expects a single value) returned more than one row. Spark SQL raises this error at runtime when the subquery result set has more than one row.

Common causes

  • 1A subquery in a SELECT list or WHERE = clause that is expected to return one row but returns multiple rows at runtime
  • 2A subquery used with `= ` instead of `IN` when the source data has grown to contain duplicates
  • 3Missing LIMIT 1 on a lookup subquery
  • 4JOIN condition not unique, causing a previously single-row subquery to return multiple rows after a data change

How to fix it

  1. 1Add `LIMIT 1` to the subquery if returning the first match is acceptable
  2. 2Use an aggregation (MAX, MIN, ANY_VALUE) inside the subquery to collapse multiple rows into one
  3. 3Change `= (subquery)` to `IN (subquery)` if multiple values are valid matches
  4. 4Investigate the source data change that caused the subquery to return multiple rows and fix the root cause
  5. 5Rewrite as a JOIN if the intent is to match all rows rather than a single scalar value

Frequently asked questions

How is this different from UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY?

UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY is a parse/planning error — Spark rejects the query structure before execution. MULTI_VALUE_SUBQUERY_ERROR is a runtime error — the query is structurally valid but data at execution time violates the scalar constraint.

Other query errors