Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

Running Regression with filters




I am trying to run linear regression and trying to use the filters to get the desired ouptut. However, it keeps throwing errors. I am attaching the packaged workflow over here. Can someone help me in this?


Thanks in advance





Alteryx Certified Partner

Hi @Himanshu123,


There are potentially a couple of issues here.

First, you are using a filter to isolate records with a single value in market segment. You are then using that in the linear regression as a predictor variable. This means a single value non-numeric categorical variable with a one to one relationship by definition. The linear regression tool can't process this.

Second, you don't have enough numeric variables to carry out a linear regression.

If this is simply a representation of the data, then if you could provide more data and more columns that are closer to what you're trying to do then I'll give that a try.




Thanks M.


I think I agree with you on your first concern. However, since I am selecting the market segment as one of the factors, I think Alteryx is trying to run the regression for each of my segments and finding the best fit line based on size and revenue for each segment. this is what I wanted. Am I wrong in this assumption?


Also, I believe that though having more variables will improve my result, it should not be a constraint in not being able to perform the regression (univariate regression requires only one variable). Theoretically, regression is the line which minimizes the sqaured deviation of the line from the observation, I do not think that will be causing the issue. Can you pinpoint me to the error which you think that suggests this?





Hi @mceleavey


I am attaching here a packaged workflow where I have removed the column market segment. It is working fine here. Can you help me why it is working here and not in the workflow earlier.




The difference is the number of rows. Even with 22 rows, there is a warning ( Linear Regression (6) The incoming data may not have enough rows to generate a model successfully.). With 10 rows, it's just not enough data. Theoretically you could process the maths behind it with 10 rows, but is the result really worth it?