STDEVX.S
The standard deviation of an expression over a table's rows, taken as a sample.
Group: Aggregation. Compatible with DAX.
Syntax
STDEVX.S ( <table>, <expression> )
| Parameter | Type | Description |
|---|---|---|
table | Table | The rows to go through. |
expression | Expression evaluated for each row | The number worked out for each row. |
Returns
Number. How far the results spread around their mean, when they are a sample of more.
Remarks
- Rows where the expression is blank are left out.
- Over a single row there is no sample deviation, and the result is NaN; over an empty table, BLANK.
Examples
The same eight values as a sample
EVALUATE
ROW (
"Sample", STDEVX.S ( DATATABLE ( "Value", INTEGER, { { 2 }, { 4 }, { 4 }, { 4 }, { 5 }, { 5 }, { 7 }, { 9 } } ), [Value] ),
"Population", STDEVX.P ( DATATABLE ( "Value", INTEGER, { { 2 }, { 4 }, { 4 }, { 4 }, { 5 }, { 5 }, { 7 }, { 9 } } ), [Value] )
)
| Sample | Population |
|---|---|
| 2.1380899352994 | 2 |
Monthly liters of each product
How much a product's monthly volume varies, month to month.
EVALUATE
SUMMARIZECOLUMNS (
Products[Product],
"Monthly spread", STDEVX.S ( VALUES ( Sales[Month] ), [Liters sold] )
)
ORDER BY Products[Product]
| Products[Product] | Monthly spread |
|---|---|
| Cider | 1253.83893930372 |
| IPA | 1400.37903032409 |
| Lettøl | 665.388710239576 |
| Pils | 3880.81121081254 |