STDEVX.S DAX Function (Statistical)
Estimates standard deviation based on a sample that results from evaluating an expression for each row of a table.
Syntax
Parameter | Attributes | Description |
---|---|---|
Table Iterator |
The table containing the rows for which the expression will be evaluated. |
|
Expression Row Context |
The expression to be evaluated for each row of the table. |
Return values
The standard deviation of a sample population.
Remarks
STDEVX.S assumes that the column refers to a sample of the population.
To compute the standard deviation with the entire population, use STDEVX.P.
» 3 related functions
Examples
-- Computes the standard deviation over a table of values -- -- STDEV.P : standard deviation over the entire population -- STDEV.S : standard deviation over a sample of the entire population -- -- STDEVX is an iterator, STDEV is the simplified version in case -- you are using a single column. DEFINE TABLE SampleData = { 2, 4, 4, 4, 5, 5, 7, 9 } EVALUATE { ( "STDEV.P", STDEV.P ( SampleData[Value] ) ), ( "STDEV.S", STDEV.S ( SampleData[Value] ) ), ( "STDEVX.P", STDEVX.P ( SampleData, SampleData[Value] ) ), ( "STDEVX.S", STDEVX.S ( SampleData, SampleData[Value] ) ), ( "STDEVX.P", STDEVX.P ( Sales, Sales[Quantity] * Sales[Net Price] ) ), ( "STDEVX.S", STDEVX.S ( Sales, Sales[Quantity] * Sales[Net Price] ) ) } -- The STDEV.S over SampleData is very different from STDEV.P because the -- set is small (8 rows for the population, 8 rows for the sample) -- When applied to Sales, the difference is small in hidden decimals because -- the set used has 100,000 rows
Value1 | Value2 |
---|---|
STDEV.P | 2.0000000000 |
STDEV.S | 2.1380899353 |
STDEVX.P | 2.0000000000 |
STDEVX.S | 2.1380899353 |
STDEVX.P | 588.4956677430 |
STDEVX.S | 588.4986034618 |
Related articles
Learn more about STDEVX.S in the following articles:
-
Statistical Patterns
IMPORTANT If you use Power BI, Analysis Services, or Excel 2016 or later versions, you can use the statistical functions in DAX. If you use Excel 2010 or Excel 2013, most of the DAX statistical functions are not available and you can rely on an alternative implementation based on DAX code as described in this page. DAX includes a few statistical aggregation functions, such as average, variance, and standard deviation. Other typical statistical calculations require you to write longer DAX expressions. Excel, from this point of view, has a much richer language. The Statistical Patterns are a collection of common […] » Read more
Related functions
Other related functions are:
Last update: Feb 2, 2025 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/stdevx-s-function-dax