DIVIDE Function (DAX)

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

DIVIDE(
     <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

Divide by the total per group
Divide with Filter Context
Power bi divide formula is averaging out the result instead of Sum

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

=DIVIDE(5,2)

=DIVIDE(5,0)

=DIVIDE(5,0,1)

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide
Membership