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

Function slope

slope( dependentY, independentX, name?): CalculatedMeasure

Calculates the slope of a linear-regression line for the given dependent and independent numeric attributes.

Note: Date and Time data types are not supported. Convert these types to custom numeric attributes.

Parameters

ParameterTypeDescription
dependentYAttributeDependent-variable attribute (y)
independentXAttributeIndependent-variable attribute (x)
name?stringOptional name for the new measure

Returns

CalculatedMeasure

A measure instance

Example

Calculate the slope of a linear regression line between Revenue and Cost

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