Rules / DAX Expressions

Use the DIVIDE function for division

warning USE_THE_DIVIDE_FUNCTION_FOR_DIVISION · ported · scope: Measure, CalculatedColumn, CalculationItem

What it checks

Expressions that use the division operator right after a closing bracket or parenthesis, such as [Sales] / [Cost] or SUM(...) / SUM(...). A slash that starts a comment is ignored.

Why it matters

Dividing by a zero or blank denominator with / produces an error, and an error in one cell takes down the whole visual with a generic message. DIVIDE returns blank in that case, or an alternate result you choose, so the visual shows a gap where the data has one instead of failing.

How to fix it

Write DIVIDE([Sales], [Cost]), with a third argument when you want something other than blank for a zero denominator.

Quirks

Links

Check a model for this Improve this page