Number.Sqrt

Number

Returns the square root of a number.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Number.Sqrt(number as nullable number) as nullable number

Parameters

NameTypeRequiredDescription
numbernumberYesThe number to compute the square root of.

Return Value

numberThe square root of the number.

Remarks

Number.Sqrt returns the square root of a non-negative number. If the input is negative, an error is raised. This function is often combined with Number.Round to produce cleaner results.

Common use cases include distance calculations, standard deviation formulas, and normalising values by their magnitude.

Examples

Example 1: Square root of product prices

Table.AddColumn(
    Table.SelectColumns(Products, {"ProductName", "Price"}),
    "SqrtPrice", each Number.Round(Number.Sqrt([Price]), 2), type number
)
Result
ProductName
Price
SqrtPrice
1Widget A255
2Gadget B507.07
3Widget C153.87
4Gadget D758.66
5Thingamajig E12010.95

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks