Rules / DAX Expressions
Use the DIVIDE function for division
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
- A slash after a number or a variable name is not matched:
1 / [Sales]andtotal / countpass. - Division by a constant,
[Sales] / 100, is flagged even though it cannot fail.