Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
matthewjbryant
Contributor II

Linest() vs Trendline Equation

I'm looking at the Linest() functions and used a Load script found on the Qlik website (attached). The Linest_b() function gives a different value to the intercept value on the trendline equation, but the Linest_b() value appears to be right.

Can anyone tell me what's going on here?

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Linest() vs Trendline Equation

My guess it that the lineair reference line stops at X=1 and therefore show the value at X=1 as the linest_b value. Whereas your linest expression correctly calculates and show the value for X=0


talk is cheap, supply exceeds demand
2 Replies
MVP & Luminary
MVP & Luminary

Re: Linest() vs Trendline Equation

My guess it that the lineair reference line stops at X=1 and therefore show the value at X=1 as the linest_b value. Whereas your linest expression correctly calculates and show the value for X=0


talk is cheap, supply exceeds demand
MVP
MVP

Re: Linest() vs Trendline Equation

I believe Gysbert is right here.

There are some few threads here that discussed this - non-intuitive IMHO - behaviour of the trendline calculation, e.g.

Matching linest_m and linest_b function to auto-generated trendline

I can only assume that this behaviour was created like it is to show e.g. trendlines for data over time in a more 'natural' way (in a sense that it is only looking at the data points available), since the zero point for dates is quite arbitrarily chosen anyway.