DIVIDE DAX Function in Power BI

The DIVIDE function in DAX is a specialized arithmetic function in Power BI designed to perform division operations while providing built-in error handling for division by zero scenarios. In the standard division operator (/), division by 0 throws an error, which gracefully handles by the DIVIDE function. So, DIVIDE function is a safer and more convenient alternative to using the division operator (/) directly.

DAX Syntax DIVIDE(numerator, denominator[, alternate_result])

The function has the following parameters:

Example: Let’s create a measure with name “Divide value”.

DAX

Divide value = DIVIDE(50, 5)

The output of the above code is 10, as shown in the image below:

DIVIDE dax function in Power BI

Example: Let’s divide by 0.

DAX

Divide value = DIVIDE(50, 0)

The output of the above code is Blank, as shown in the image below:

DIVIDE dax function in Power BI

Example: Let’s specify the Alternate result.

DAX

Divide value = DIVIDE(50, 0, 0)

The output of the above code is 0, as shown in the image below:

DIVIDE dax function in Power BI