Aggregate functions cannot be executed on non-numeric fields.
AggAvg
Description |
Returns the average of the values in the field. |
Remark |
Only accepts Data Fields as input. |
Example |
Ex. aggAvg({OrderDetail.Quantity}) - returns the average quantity of sales orders. |
AggCount
Description |
Returns the number of unique entities in the Data Category. |
Remark |
The aggCount function uses the Data Category, not the Data Field. For example, the function “aggCount( {Officer.Salary} )” counts the number of Officers. You could replace “Officer.Salary” with any other field in the Officer Data Category and the function would still count the number of officers. |
Example |
Ex. aggCount( {Orders.ProductPrice}) - returns the number of sales orders. |
AggDistinctCount
Description |
Returns the number of unique values in the Data Field. |
Remark |
Unlike aggCount, aggDistinctCount returns the number of unique values of the Data Field. |
Example |
Ex. aggDistinctCount({OrderDetail.Quantity}) - returns the number distinct quantities in an order. |
AggMax
Description |
Returns the maximum value in the field. |
Remark |
Only accepts Data Fields as input. |
Example |
Ex. aggMax({OrderDetail.Discount}) - returns the largest discount. |
AggMin
Description |
Returns the minimum value in the field. |
Remark |
Only accepts Data Fields as input. |
Example |
Ex. aggMin({OrderDetail.Discount}) - returns the smallest discount. |
AggSum
Description |
Returns the sum of the values in the field. |
Remark |
Only accepts Data Fields as input. |
Example |
Ex. aggSum({OrderDetail.Quantity}) - returns the total quantity of units ordered. |
RunningSum
Description |
Returns a running total of the input field. |
Remark |
Takes one or two input: 1. The Data Field you want to sum. NOTE. RunningSum should not be used with the AutoSum feature. |
Example |
Ex. 1. RunningSum({Employees.Salary}) – returns running total of all the employee’s salary. 2. RunningSum({Employees.Salary}, {Employees.Region}) – returns a running total of employee’s salary for each region. 3. RunningSum({Employees.Salary}, {Company}) – returns a running total of employee’s salary for each Company. |