Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problems with adding a trendline in line graph

Hello,

I am having problems with calculating a trendline in a line graph, using the linest_m and linest_b functions.

Here is my expression:

//-----------------------------------

LINEST_B(
total aggr(sum(numDistanceSteamingTotal) / sum(numTimeSteamingTotal),dtmPeriodStart),
    aggr(RowNo(),dtmPeriodStart)
)

+

LINEST_M(
total aggr(sum(numDistanceSteamingTotal) / sum(numTimeSteamingTotal),dtmPeriodStart),
    aggr(RowNo(),dtmPeriodStart)


RowNo()

//-----------------------------------

I get back a result - a straight line, but it is obviously not the correct closest fit to my other expression. See attached picture. linest example.png

Any help in finding a solution to this would be greatly appreciated!

Best Regards,

Niclas

0 Replies