Announcements
cancel
Showing results for
Did you mean:
Specialist

## Linest functions

Hi, does anybody know how to retrieve an "a" value in formula y=bx+a from LINEST functions?

1 Solution

Accepted Solutions
MVP

You can use the linest_b() function for that

LINEST_B - chart function ‒ QlikView

13 Replies
MVP

You can use the linest_b() function for that

LINEST_B - chart function ‒ QlikView

Specialist
Author

Linest_B doesn't give an "a" value from the formula y=bx+a

Specialist
Author

By the way, I'm talking about manual accumulative calculation. Maybe in accumulative it's different?
It seems that "a" = Linest_M+Linest_B. Am I right?

MVP

Not sure why not. From the HELP:

LINEST_B() returns the aggregated b value (y-intercept) of a linear regression defined by the equation y=mx+b for a series of coordinates represented by paired numbers in the expressions given by the expressions x_value and y_value, iterated over the chart dimensions.

MVP

Linoy, the linest functions consume a table with two related columns, one showing 'x' values, the other 'y' values (if you think of a cartesian x/y graph). These functions then calculate the 'slope' resp. the 'y-interception' of a linear regression.

Linear regression - Wikipedia

If the y-values in that source tables are cumulative numbers or not doesn't really matter for the linest function, that's part of your task as a developer to create / calculate the correct numbers to feed into the linest functions.

(There is no option or something like that you can enable with the linest functions to enable an automatic accumulation, if that's what you were thinking of, like in the line graph).

Specialist
Author

Yeah, i saw that but can you please look at the sample example attached? The manual calculated regression line matches the automatic one but b from y=mx+b seems to be equal to Linest_M+Linest_B:

3 + (- 0.67) = 2.3333

MVP

Yeah, I believe the automatic linear regression equation shown in the chart is crap.

Specialist
Author

Ha ha ha

So, "b" value from the y=mx+b equation is b=Linest_M+Linest_B?

OR:

b = Linest_B and b value from automatic equation is wrong?

MVP

The b value from the automatic equation is wrong, it's giving y-intersection value at x=1 (first x dimensional value), not at x=0. The equation clearly doesn't match the shown line.

Community Browser