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](/legacyfs/online/113978_linest example.png)
Any help in finding a solution to this would be greatly appreciated!
Best Regards,
Niclas