Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

What is the alternative of 'LINEST' excel function in Alteryx?

mayankagruce
7 - Meteor

I need the alternate option to calculate data what the LINEST function does, i have y values and only want to use them

5 REPLIES 5
jdunkerley79
ACE Emeritus
ACE Emeritus

To perform a linear regression and fit results you can use the predictive tools:

jdunkerley79_0-1592223415626.png

 

- Linear Regression will create the model

- Score will fit other values to the model

 

Alternatively, I have a blog post on creating a Linear Regression macro which does it from first principles.

 

If you want it as a formula function that is a harder ask!

mayankagruce
7 - Meteor

Thanks for detailed reply. for my problem, i don't have both x and y values,

i have four values 

 

Total5 Year2 Year1 Year
0.14250.21170.24170.4833
0.33330.42831.00001.0000


and in excel, in another column there is a formula =LINEST("these four columns as known y's") and it gives me result like below:

 

Total5 Year2 Year1 YearLINEST result
0.14250.21170.24170.48330.105
0.33330.42831.00001.00000.257

 

and then i use the result column in another calculation with  which i am familiar.

i don't know much too much statistics, so if you can propose some simple solution based on above problem, it would be great.

jdunkerley79
ACE Emeritus
ACE Emeritus

Excel uses 1,2,3,4 for X when not given one.

 

I threw together a macro which will compute the Slope for this. It takes whatever column set it is given and adds an additional column with the LinEst value (the slope for the row points).

 

As you had multiple rows I based this off doing sums and some stats.

 

Hopefully you can use this to get started.

MichaelLaRose
10 - Fireball

Hi @mayankagruce 

 

You should use @jdunkerley79 's response with the following change.

 

LINEST assumes that you data has Y values, and if you do not provide an X value it assumes that the values are 1,2,3, etc. https://support.office.com/en-us/article/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d

 

So you should just need to add a second column with a row ID to get the same results as the LINEST function.

 

Best,

Michael

mayankagruce
7 - Meteor

Thanks a lot ! you just saved me from getting stuck at this point by helping here. I got the idea from your macro on how to create same result as LINEST. I just finished my project after that..again thanks a lot.

Labels