MetricSign
EN|NLRequest Access
Medium severitysql

Power BI Refresh Error:
ARITHMETIC_OVERFLOW

What does this error mean?

A numeric operation produced a result that exceeds the maximum value for the target data type. The query is aborted to prevent silent data corruption from truncated values.

Common causes

  • 1Multiplying two large INTEGER or BIGINT columns whose product exceeds the type's range
  • 2Casting a DOUBLE or DECIMAL with a large value to a smaller type like INT or SMALLINT
  • 3Aggregation functions (SUM, COUNT) accumulating values beyond the type limit over large datasets
  • 4Arithmetic on DECIMAL columns where intermediate results exceed the defined precision
  • 5An upstream data change introduced larger-than-expected numeric values

How to fix it

  1. 1Cast operands to a larger type before the operation: CAST(col AS BIGINT) * CAST(col2 AS BIGINT)
  2. 2Use TRY_CAST or TRY() to return NULL instead of raising an error on overflow
  3. 3Review the column definitions — switch from INT to BIGINT or DECIMAL with higher precision
  4. 4Inspect the actual data range: SELECT MAX(col), MIN(col) to see if the data exceeds type bounds
  5. 5Add a data quality check upstream to reject or flag rows with values outside the expected range

Frequently asked questions

Can I suppress ARITHMETIC_OVERFLOW without fixing the query?

Yes — wrap the expression in TRY(): SELECT TRY(big_col * other_col) returns NULL instead of raising an error. Validate that NULLs are acceptable downstream before using this approach.

Does this error affect Python/PySpark code too?

In PySpark, Python arithmetic uses Python's arbitrary-precision integers, so overflow is less common. ARITHMETIC_OVERFLOW typically surfaces in Databricks SQL queries and Spark SQL expressions.

Other sql errors