LinRegPoint

Analysis Services

Analysis Services

LinRegPoint

Calculates the linear regression of a set and returns the value of y in the regression line y = ax + b.

Syntax

LinRegPoint(«Numeric Expression», «Set», «Numeric Expression»[, «Numeric Expression»])

Remarks

Linear regression that uses the least-squares method calculates the equation of the best-fit line for a series of points. Let the regression line be given by the following equation, where a is called the slope and b is called the intercept:

y = ax+b

LinRegPoint uses its last three arguments like the other LinRegxxx functions use them: to calculate the regression line. The function evaluates the first argument and uses the resulting number as the x value in the regression equation (y = ax + b) to calculate the y value.

Note  Empty cells or cells containing text or logical values are ignored; however, cells with values of zero are included.

Example

This example finds the trend in Sales for the sales of the last nine periods and forecasts the next period:

LinRegPoint(10, LastPeriods(9), Sales) returns the next period.