How does the DIVIDE function (DAX) work?
The DIVIDE function (DAX) performs division and returns alternate result or BLANK() on division by 0.
DIVIDE Formula Syntax
<numerator>, <denominator> [,<alternateresult>]
How do you use the DIVIDE function?
The DIVIDE function is used to divide a numerator by a denominator.
When using DIVIDE function you must pass in numerator and denominator expressions.
Optionally, you can pass in a value that represents an alternate result.
Used DIVIDE function whenever the denominator is an expression that could return zero or BLANK.
Related Blog Posts
Related Support Forum Posts
Considerations when using the DIVIDE function
In the case that the denominator is a constant value, we recommend that you use the divide operator. In this case, the division is guaranteed to succeed, and your expression will perform better because it will avoid unnecessary testing.
Carefully consider whether the DIVIDE function should return an alternate value. For measures, it’s usually a better design that they return BLANK. Returning BLANK is better because report visuals—by default—eliminate groupings when summarizations are BLANK. It allows the visual to focus attention on groups where data exists. When necessary, you can configure the visual to display all groups (that return values or BLANK) within the filter context by enabling the Show items with no data option.
Related Video Tutorials
Formula examples using the DIVIDE function