Page 49 - DAX-Formula-Reference-Guide-Enterprise-DNA_Neat
P. 49
DAX Formulas Reference Guide | Statistical Functions (DAX)
AVERAGEX Function (DAX)
Calculates the average (arithmetic mean) of a set of expressions evaluated over a table.
Syntax: AVERAGEX(<table>,<expression>)
Parameter Definition
table Name of a table, or an expression, that specifies the table over which the
aggregation can be performed.
expression An expression with a scalar result, which will be evaluated for each row of
the table in the first argument.
Return Value:
A decimal number.
Example:
The following example calculates the average freight and tax on each order in the
InternetSales table, by first summing Freight plus TaxAmt in each row, and then averaging
those sums.
=AVERAGEX(InternetSales,InternetSales[Freight]+InternetSales[TaxAmt])
COUNT Function (DAX)
The COUNT function counts the number of cells in a column that contains numbers.
Syntax: COUNT(<column>)
Parameter Definition
column The column that contains the numbers to be counted.
Return Value:
A whole number.
Example:
The following example shows how to count the number of numeric values in the column,
ShipDate.
=COUNT([ShipDate])
To count logical values or text, use the COUNTA or COUNTAX functions.
+64 21 164 5508 | info@enterprisedna.co 49

