LinRegPoint
Calculates the linear regression of a set and returns the value of y in the regression line y = ax + b
Syntax
LinRegPoint(SliceX_Numeric_Expression, Set_Expression, Y_Numeric_Expression [, X_Numeric_Expression])
Arguments
SliceX_Numeric_Expression | Numeric expression that represents the x value to which to predict the y value. |
|---|---|
Set_Expression | MDX expression that returns a set of data points used for the regression analysis. |
Y_Numeric_Expression | Numeric expression that represents the y values for the function. |
X_Numeric_Expression | (Optional) Numeric expression that represents the x-values. If not specified, the function uses the current context as x-values. Not specifying the x-axis argument is frequently used with the Time dimension. |
Examples
The following example shows the Remaining Story points trend over Time per Sprint period.
LinRegPoint(
-- Slice X Numeric expression
DateToTimestamp([Time].CurrentHierarchyMember.StartDate),
-- Set expression - input period
Filter(
[Time].CurrentHierarchyMember.Level.Members,
[Measures].[Time within Sprint] > 0
),
-- Y axis Numeric expression
[Measures].[Story Points remaining],
-- X axis Numeric expression
DateToTimestamp([Time].CurrentHierarchyMember.StartDate)
)
eazyBI default calculation Linear trend you can add to the report uses the LinRegPoint function to generate trend line on visible rows (x-axis) values.