SQRT
A
C
- CALCULATE
- CALCULATETABLE
- CALENDAR
- CALENDARAUTO
- CEILING
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CLOSINGBALANCEMONTH
- CLOSINGBALANCEQUARTER
- CLOSINGBALANCEYEAR
- COALESCE
- COLUMNSTATISTICS
- COMBIN
- COMBINA
- COMBINEVALUES
- CONCATENATE
- CONCATENATEX
- CONFIDENCE.NORM
- CONFIDENCE.T
- CONTAINS
- CONTAINSROW
- CONTAINSSTRING
- CONTAINSSTRINGEXACT
- CONVERT
- COS
- COSH
- COT
- COTH
- COUNT
- COUNTA
- COUNTAX
- COUNTBLANK
- COUNTROWS
- COUNTX
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNCD
- COUPNUM
- COUPPCD
- CROSSFILTER
- CROSSJOIN
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENTGROUP
- CUSTOMDATA
D
E
I
N
O
P
R
S
- SAMEPERIODLASTYEAR
- SAMPLE
- SEARCH
- SECOND
- SELECTCOLUMNS
- SELECTEDMEASURE
- SELECTEDMEASUREFORMATSTRING
- SELECTEDMEASURENAME
- SELECTEDVALUE
- SIGN
- SIN
- SINH
- SLN
- SQRT
- SQRTPI
- STARTOFMONTH
- STARTOFQUARTER
- STARTOFYEAR
- STDEVX.P
- STDEVX.S
- STDEV.P
- STDEV.S
- SUBSTITUTE
- SUBSTITUTEWITHINDEX
- SUM
- SUMMARIZE
- SUMMARIZECOLUMNS
- SUMX
- SWITCH
- SYD
T
U
Syntax of the SQRT function
The syntax of the SQRT function in DAX is as follows:
SQRT(number)
The **number** argument is the value for which you want to find the square root. This argument can be a column, a numeric expression, or a scalar value.
Example of using the SQRT function
Let's say you have a table in Power BI that contains the sales data for a company. You want to create a new column in this table that calculates the square root of the sales amount. Here's how you can do it:
1. Open the Power BI Desktop application and load the sales data table.
2. Click on the "Modeling" tab in the ribbon menu and select "New Column".
3. In the formula bar, type the following formula:
Square Root Sales = SQRT(Sales[Amount])
4. Press the Enter key to apply the formula.
5. Power BI will create a new column in the table with the name "Square Root Sales" that contains the square root of the sales amount for each row.
Using the SQRT function with other DAX functions
The SQRT function can be used in combination with other DAX functions to perform more complex calculations. For example, you can use the SQRT function along with the SUMX function to calculate the square root of the sum of all sales amounts. Here's how you can do it:
1. Open the Power BI Desktop application and load the sales data table.
2. Click on the "Modeling" tab in the ribbon menu and select "New Measure".
3. In the formula bar, type the following formula:
Square Root Total Sales = SQRT(SUMX(Sales, Sales[Amount]))
4. Press the Enter key to apply the formula.
5. Power BI will create a new measure with the name "Square Root Total Sales" that contains the square root of the sum of all sales amounts.
The SQRT function is a powerful tool in the Power BI DAX language that allows you to calculate the square root of a given number. In this article, we explored the syntax of the SQRT function and how to use it in Power BI to create new columns and measures. We also showed how the SQRT function can be used in combination with other DAX functions to perform more complex calculations. By using the SQRT function, you can gain deeper insights into your data and make more informed decisions.