Description
Enables you to calculate the correlation of the specified fields (that is, the degree to which the fields vary in the same manner).
Overloads
Correlation (fld, fld, condFld)
Correlation (fld, fld, condFld, cond)
Arguments
fld is any numeric field.
condFld is a field used to group the values in fld by.
cond is a String indicating the type of grouping for condFld. You only specify this argument when condFld is a Date, Time, DateTime or Boolean field. For more information on the valid strings for this argument, see
Conditions for summary functions.
Action
Enables you to calculate the correlation of the specified fields (that is, the degree to which the fields vary in the same manner). For example:
You can calculate the correlation of two fields, for all the records in the report.
You can calculate the correlation of two fields for all values within a group (for example, sales grouped by the state that they come from).
You can calculate the correlation of two fields for all the values within a group in which grouping is controlled by changes in a date or Boolean field (for example, sales grouped by the month in which they were made).
Examples
Correlation({Customer.CUSTOMER ID}, {Customer.CREDIT ID})
Calculates the correlation between the Customer ID and Credit ID fields.
Correlation({orders.CUSTOMER ID}, {orders.CREDIT ID}, {Customer.REGION})
Calculates the correlation between the Customer ID and Credit ID fields, for each region.
Correlation({orders.CUSTOMER ID}, {orders.CREDIT ID}, {Customer.REGION}, "monthly")
Calculates the correlation between the Customer ID and Credit ID fields for all the values within each Region group, for each month.
Using this function in a formula forces the formula to be evaluated at print time.
For more information on evaluation time considerations, see
Evaluation Time.
Comments
The correlation will always be a number between -1 and 1, unless the correlation is undefined, in which case the function is assigned a null value (0). If the correlation is 0, the fields are uncorrelated.