Aggregate functions perform operations on multiple values to create summary results.
Function | Example | Description |
---|---|---|
Avg |
|
Calculates the average (mean) of a numeric set of values. |
Bin |
|
Selects any numeric attribute from a dimension, fact table, or measure containing data values and places them into a discrete number of bins. This function is treated like a new dimension attribute for purposes such as aggregation, filtering, and drilling. |
Count |
|
Determines the number of items with a non-null value. |
First |
|
Selects the first non-null returned value of the expression argument. The |
Last |
|
Selects the last non-null returned value of the expression. |
Max |
|
Calculates the maximum value (highest numeric value) of the rows satisfying the numeric expression argument. |
Median |
|
Calculates the median (middle) value of the rows satisfying the numeric expression argument. When there are an even number of rows, the median is the mean of the two middle rows. This function always returns a double. |
Min |
|
Calculates the minimum value (lowest numeric value) of the rows satisfying the numeric expression argument. |
StdDev |
|
Returns the standard deviation for a set of values. The return type is always a double. |
StdDev_Pop |
|
Returns the standard deviation for a set of values using the computational formula for population variance and standard deviation. |
Sum |
|
Calculates the sum obtained by adding up all values satisfying the numeric expression argument. |