This function helps in calculating a (scalar) value such as count, sum, average, minimum, or maximum for all rows in a column or table as defined by the expression.
Following is the list of aggregation functions supported in Wyn Enterprise:
Description
The AVERAGE function returns the average (arithmetic mean) of all the numbers in a column.
Syntax
AVERAGE(<column>)
Parameters
Return Value
A decimal number.
Example
AVERAGE('Sale'[Price])
The AVERAGEX function calculates the average (arithmetic mean) of a set of expressions evaluated over a table.
AVERAGEX(<table>,<expression>)
AVERAGEX('Sale','Sale'[Price])
The COUNT function counts the number of cells in a column that contain non-blank values.
COUNT(<column>)
A whole number.
COUNT('Product'[Name])
The COUNTROWS function counts the number of rows in the specified table, or a table defined by an expression.
COUNTROWS(<table>)
COUNTROWS('Product')
The COUNTX function counts the number of rows that contain a non-blank value or an expression that evaluates to a non-blank value when evaluating an expression over a table.
COUNTX(<table>,<expression>)
An integer.
COUNTX('Product','Product'[Name])
The DISTINCTCOUNT function counts the number of distinct values in a column.
DISTINCTCOUNT(<column>)
The number of distinct values in the column.
DISTINCTCOUNT('Product'[Name])
The DISTINCTCOUNTX function counts the number of rows that contain a non-blank distinct value or an expression that evaluates to a non-blank distinct value when evaluating an expression over a table.
DISTINCTCOUNTX(<table>,<expression>)
DISTINCTCOUNTX('Product','Product'[Name])
The MAX function returns the largest value in a column, or between two scalar expressions.
MAX(<column>)
The largest value.
MAX('Sale'[Price])
The MAXX function evaluates an expression for each row of a table and returns the largest value.
MAXX(<table>,<expression>)
MAXX('Sale','Sale'[Price])
The MIN function returns the smallest value in a column, or between two scalar expressions.
MIN(<column>)
The smallest value.
MIN('Sale'[Price])
The MIN function returns the smallest value that results from evaluating an expression for each row of a table.
MINX(<table>,<expression>)
MINX('Sale','Sale'[Price])
The SUM function adds all the numbers in a column.
SUM(<column>)
SUM('Sale'[Price])
The SUMX function returns the sum of an expression evaluated for each row in a table.
SUMX(<table>,<expression>)
SUMX('Sale','Sale'[Price])