sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

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

ParameterTypeDescription
attributeAAttributeFirst attribute
attributeBAttributeSecond attribute
name?stringOptional name for the new measure

Returns

CalculatedMeasure

A measure instance

Example

Returns the correlation coefficient measure between Revenue and Cost

measureFactory.correlation(DM.Commerce.Revenue, DM.Commerce.Cost)
Last Updated: