Statistical functions

Data Analysis Expressions (DAX) provides many functions for creating aggregations such as sums, counts, and averages. These functions are very similar to aggregation functions used by Microsoft Excel. This section lists the statistical and aggregation functions provided in DAX.

In this section

Function Description
ADDCOLUMNS Adds calculated columns to the given table or table expression.
APPROXIMATEDISTINCTCOUNT Returns the approximate number of rows that contain distinct values in a column.
AVERAGE Returns the average (arithmetic mean) of all the numbers in a column.
AVERAGEA Returns the average (arithmetic mean) of the values in a column.
AVERAGEX Calculates the average (arithmetic mean) of a set of expressions evaluated over a table.
BETA.DIST Returns the beta distribution.
BETA.INV Returns the inverse of the beta cumulative probability density function (BETA.DIST).
CHISQ.INV Returns the inverse of the left-tailed probability of the chi-squared distribution.
CHISQ.INV.RT Returns the inverse of the right-tailed probability of the chi-squared distribution.
CONFIDENCE.NORM The confidence interval is a range of values.
CONFIDENCE.T Returns the confidence interval for a population mean, using a Student's t distribution.
COUNT The COUNT function counts the number of cells in a column that contain numbers.
COUNTA The COUNTA function counts the number of cells in a column that are not empty.
COUNTAX The COUNTAX function counts nonblank results when evaluating the result of an expression over a table.
COUNTBLANK Counts the number of blank cells in a column.
COUNTROWS The COUNTROWS function counts the number of rows in the specified table, or in a table defined by an expression.
COUNTX Counts the number of rows that contain a number or an expression that evaluates to a number, when evaluating an expression over a table.
CROSSJOIN Returns a table that contains the Cartesian product of all rows from all tables in the arguments.
DATATABLE Provides a mechanism for declaring an inline set of data values.
DISTINCTCOUNT Counts the number of distinct values in a column.
DISTINCTCOUNTNOBLANK Counts the number of distinct values in a column.
EXPON.DIST Returns the exponential distribution.
GENERATE Returns a table with the Cartesian product between each row in table1 and the table that results from evaluating table2 in the context of the current row from table1.
GENERATEALL Returns a table with the Cartesian product between each row in table1 and the table that results from evaluating table2 in the context of the current row from table1.
GEOMEAN Returns the geometric mean of the numbers in a column.
GEOMEANX Returns the geometric mean of an expression evaluated for each row in a table.
MAX Returns the largest numeric value in a column, or between two scalar expressions.
MAXA Returns the largest value in a column.
MAXX Evaluates an expression for each row of a table and returns the largest numeric value.
MEDIAN Returns the median of numbers in a column.
MEDIANX Returns the median number of an expression evaluated for each row in a table.
MIN Returns the smallest numeric value in a column, or between two scalar expressions.
MINA Returns the smallest value in a column, including any logical values and numbers represented as text.
MINX Returns the smallest numeric value that results from evaluating an expression for each row of a table.
NORM.DIST Returns the normal distribution for the specified mean and standard deviation.
NORM.INV The inverse of the normal cumulative distribution for the specified mean and standard deviation.
NORM.S.DIST Returns the standard normal distribution (has a mean of zero and a standard deviation of one).
NORM.S.INV Returns the inverse of the standard normal cumulative distribution.
PERCENTILE.EXC Returns the k-th percentile of values in a range, where k is in the range 0..1, exclusive.
PERCENTILE.INC Returns the k-th percentile of values in a range, where k is in the range 0..1, inclusive.
PERCENTILEX.EXC Returns the percentile number of an expression evaluated for each row in a table.
PERCENTILEX.INC Returns the percentile number of an expression evaluated for each row in a table.
POISSON.DIST Returns the Poisson distribution.
RANK.EQ Returns the ranking of a number in a list of numbers.
RANKX Returns the ranking of a number in a list of numbers for each row in the table argument.
ROW Returns a table with a single row containing values that result from the expressions given to each column.
SAMPLE Returns a sample of N rows from the specified table.
SELECTCOLUMNS Adds calculated columns to the given table or table expression.
SIN Returns the sine of the given angle.
SINH Returns the hyperbolic sine of a number.
STDEV.P Returns the standard deviation of the entire population.
STDEV.S Returns the standard deviation of a sample population.
STDEVX.P Returns the standard deviation of the entire population.
STDEVX.S Returns the standard deviation of a sample population.
SQRTPI Returns the square root of (number * pi).
SUMMARIZE Returns a summary table for the requested totals over a set of groups.
T.DIST Returns the Student's left-tailed t-distribution.
T.DIST.2T Returns the two-tailed Student's t-distribution.
T.DIST.RT Returns the right-tailed Student's t-distribution.
T.INV Returns the left-tailed inverse of the Student's t-distribution.
T.INV.2t Returns the two-tailed inverse of the Student's t-distribution.
TAN Returns the tangent of the given angle.
TANH Returns the hyperbolic tangent of a number.
TOPN Returns the top N rows of the specified table.
VAR.P Returns the variance of the entire population.
VAR.S Returns the variance of a sample population.
VARX.P Returns the variance of the entire population.
VARX.S Returns the variance of a sample population.
XIRR Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic.
XNPV Returns the present value for a schedule of cash flows that is not necessarily periodic.