OpenBI Docs Buy

SQRT

The number's square root: the non-negative value that, squared, gives it.

Group: Math. Compatible with DAX.

Syntax

SQRT ( <number> )
ParameterTypeDescription
numberNumberA number of 0 or more.

Returns

Number. The square root: the number of 0 or more that, multiplied by itself, gives the number.

Remarks

  • A negative number is an error. A blank gives BLANK.
  • SQRT ( x ) is POWER ( x, 0.5 ).
  • Square roots are rarely exact in floating point: SQRT ( 2 ) * SQRT ( 2 ) = 2 is FALSE. Round before comparing.

Examples

Square roots

EVALUATE
ROW (
    "Of 16", SQRT ( 16 ),
    "Of 2", SQRT ( 2 ),
    "Of blank", SQRT ( BLANK () )
)
Of 16Of 2Of blank
41.4142135623731(blank)

Compare after rounding

EVALUATE
ROW (
    "As it is", SQRT ( 2 ) * SQRT ( 2 ) = 2,
    "Rounded", ROUND ( SQRT ( 2 ) * SQRT ( 2 ), 10 ) = 2
)
As it isRounded
FALSETRUE

POWER, SQRTPI, ABS.

Last updated · OpenBI Studio 0.3.74