DIVIDEDAX Function (Math and Trig)

Safe Divide function with ability to handle divide by zero case.

Syntax

DIVIDE ( <Numerator>, <Denominator> [, <AlternateResult>] )
Parameter Attributes Description
Numerator

Numerator.

Denominator

Denominator.

AlternateResult Optional

Optional. The alternate result to return when dividing by zero.

Return values

Scalar A single decimal value.

Result of the division between Numerator and Denominator, or AlternateResult in case there is a division by zero.

Remarks

Alternate result on divide by 0 must be a constant. By default, the AlternateResult argument is BLANK.
DIVIDE is faster than an IF statement checking whether the denominator is zero. However, DIVIDE is executed in the formula engine and it is not as fast as a native division.

Related articles

• DIVIDE Performance

The DIVIDE function in DAX is usually faster to avoid division-by-zero errors than the simple division operator. However, there are exceptions to this rule, described in this article through a simple performance analysis. » Read more

Related functions

Other related functions are:

Last update: Oct 15, 2019     » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber

MSDN documentation: https://docs.microsoft.com/en-us/dax/divide-function-dax

DAX Conventions
• Use [measure] and never use table[measure]
• Use table[column] and never use [column]
• Space before ‘(‘ and ‘)’ and any operand and operator
• Space before an in-line argument
• Definitions in the first row, including the assignment
• Use ‘=’ to define calculated columns / tables
• Use ‘:=’ to define measures
Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

Contribute

Want to improve the content of DIVIDE? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.