Function correlation
correlation(
attributeA,attributeB,name?):CalculatedMeasure
Calculates the correlation coefficient between two numeric attributes. Returns values in range [-1, 1] or N/A when either attribute has zero variance.
Parameters
| Parameter | Type | Description |
|---|---|---|
attributeA | Attribute | First attribute |
attributeB | Attribute | Second attribute |
name? | string | Optional name for the new measure |
Returns
A measure instance
Example
Returns the correlation coefficient measure between Revenue and Cost
measureFactory.correlation(DM.Commerce.Revenue, DM.Commerce.Cost)