10

DIVIDE DAX Function (Math and Trig)

 3 years ago
source link: https://dax.guide/divide/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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

Learn more about DIVIDE in the following articles:

Related functions

Other related functions are:

2018-2020 © SQLBI. All rights are reserved. Information coming from MSDN is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK