Dear all,
I'm aiming to do a simple linear regression but I struggle to properly input my data. I have the following fields:
See below a snippet of the input data:
What I did so far is:
As you can see the fields 'Year' and 'Month' are treated individually. Instead, I'd like to create a combined date field such as yyyy-mm-01 and use this as a predictor together with the field 'KPI'.
However, when I do this, the newly created date-field doesn't show up in the predictors menu.
In Tableau, where this work is done in the background, the result looks quite nice:
Can someone please point me in the right direction to create my regression based on the 2 predictors 'Date' and 'KPI'?
Many thanks in advance
Solucionado! Ir para Solução.
If you are working with date data, you might want to instead use the Time Series tools!
This might be helpful to start: Performing Time Series Forecasting in Alteryx Designer - Alteryx Community
Thanks for the quick response!
Yes, I also use ETS / ARIMA. But in addition, I want to do the linear regression.
@uhoelker as @alexnajm says you'll want to use a time series tool (ARIMA or ETS) to do a time series prediction most likely.
However, you can combine the Year and Month fields to create a new numeric field with a formula like:
[Year]+(([Month]-1)/12)
This will allow you to do your linear regression
Hope that helps,
Ollie
Oh, that's smart and simple at the same time.
Thank you!
@uhoelker
I just did this approach with superstore and it does seem to marry