STDEVX.S Function (DAX)

How does the STDEVX.S function (DAX) work?

The STDEVX.S function (DAX) returns the standard deviation of a sample population.

STDEVX.S Formula Syntax

     <table>, <expression>

How do you use the STDEVX.S function?

This function is used to evaluate an expression for each row of the table and returns the standard deviation of an expression, assuming that the table refers to a sample of the population.

Related Blog Posts

Related Support Forum Posts

Confusion in using “Thin and Long Fact Table”
Z Scores in DAX
Dax Calculation question

Considerations when using the STDEVX.S function

  1. STDEVX.S evaluates expression for each row of table and returns the standard deviation of expression assuming that table refers to a sample of the population. If table represents the entire population, then compute the standard deviation by using STDEVX.P.
  2. STDEVX.S uses the following formula:√[∑(x – x̃)²/(n-1)]where x̃ is the average value of x for the entire populationand n is the population size
  3. Blank rows are filtered out from columnName and not considered in the calculations.
  4. An error is returned if columnName contains less than 2 non-blank rows.

This DAX function may return different results when used in a model that is deployed and then queried in DirectQuery mode.

Related Video Tutorials

Formula examples using the STDEVX.S function

=STDEVX.S(RELATEDTABLE(InternetSales_USD), InternetSales_USD[UnitPrice_USD] – (InternetSales_USD[DiscountAmount_USD]/InternetSales_USD[OrderQuantity]))

= STDEVX.S (West_Sales,West_Sales[Amount])


Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide