Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, everyone.
I created a bar chart and markd Linear in Trendlines, it showed me the equation in chart.
But how can I get this equation and value R?
Thanks....
OK, attached is an example with a couple different ways of displaying the forecast. It turned out to be more complicated than I showed since you don't just have two fields, but rather a field and an expression. Here's how it ended up:
linest_m(total aggr(sum(Sales),Month),Month)*Month
+linest_b(total aggr(sum(Sales),Month),Month)
Hi.
I'm trying to use the equation to get the next value, so I need the linear equation (via macro, maybe).
Did you find the way?
Regards
Julian
I believe the equation for the trend line for a set of points (X,Y) is this:
Y = linest_m(Y,X)*X + linest_b(Y,X)
I've done that before to be able to mouse over the trend line and see the value at that point.
By R value, I think Ben means the correlation coefficient, which would be the correl() function, but it doesn't look like you needed that, though I do think it's important to show at least the correlation when making predictive models. In some cases, you may get a prediction, but there's no reason to believe it because the data is at best very loosely correlated.
Hi John.
Thank you for your reply. Do you have any example of that? how to use it?
I have one Bar Chart, with Month as a Dimension and Sum(Sales) as Expression. How can I use what you said to find the equation and the next value (projection)?
Best regards
Julian
OK, attached is an example with a couple different ways of displaying the forecast. It turned out to be more complicated than I showed since you don't just have two fields, but rather a field and an expression. Here's how it ended up:
linest_m(total aggr(sum(Sales),Month),Month)*Month
+linest_b(total aggr(sum(Sales),Month),Month)
That's so great!!!!!!