SQRT DAX Function (Math and Trig)

Returns the square root of a number.

Syntax

SQRT ( <Number> )
Parameter Attributes Description
Number

The number for which you want the square root.

Return values

Scalar A single decimal value.

Square root of Number.

Remarks

If the number is negative, the SQRT function returns an error.

» 1 related function

Examples

--  SQRT computes the square root of a number
--  POWER raises the number to the required power
DEFINE
    VAR Vals = GENERATESERIES ( 1, 25, 3 )
EVALUATE
ADDCOLUMNS ( 
    Vals,
    "SQRT",        SQRT   ( [Value] ),
    "POWER (0.5)", POWER  ( [Value], 0.5 ),
    "POWER (4)",   POWER  ( [Value],   4 ),
    "POWER  -1",   POWER  ( [Value],  -1 )
)

Value SQRT POWER (0.5) POWER (4) POWER -1
1 1.00 1.00 1 1.00
4 2.00 2.00 256 0.25
7 2.65 2.65 2,401 0.14
10 3.16 3.16 10,000 0.10
13 3.61 3.61 28,561 0.08
16 4.00 4.00 65,536 0.06
19 4.36 4.36 130,321 0.05
22 4.69 4.69 234,256 0.05
25 5.00 5.00 390,625 0.04

Related functions

Other related functions are:

Last update: Nov 14, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://docs.microsoft.com/en-us/dax/sqrt-function-dax

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

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.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.