Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Predictive Model

Feras95p
8 - Asteroid

Dear all, 

 

I would like to ask you how can I build a predictive model that predict the sales of the next year with respect to the data provided of 2017,2018 and 2019. I would like also to filter out the customers who have the high probability to order again, for this I have the phones number of the customers that are ordered in 2017, 2018 and 2019. I have attached the sample excel sheet of the data that I have and according to this data I want to build the predictive model. So, any help in that please?

 

 Note that: The data that I want to predict the sales of it it's from C column to N column.

I delete the phones number of the customer because of the privacy.

 

Thanks in advance for your kind support.

13 REPLIES 13
Feras95p
8 - Asteroid

Thanks a lot for your help, but I have the last question, could you please explain only for me how do you calculate the avg between the last visits?

 

RolandSchubert
16 - Nebula
16 - Nebula

I select the customers with visit count > 1 (for all other customers an average makes no sense).

 

Next step is sorting by mobile (= customer) and date. The Multi-Row Formula tool calculates the difference between subsequent rows using the formula DateTimeDiff([Date], [Row-1:Date], 'days'). Selecting [mobile phone] in the "Group by" option, ensures that the difference between visits of each customer is calculated separately.

 

As the first row has no predecessor, the difference is NULL for this row, so I filter them out by using a filter tool (added this in the new version)

 

To calculate the average, the Summarize tool is used  - Group by mobile (= customer) and average for difference.

Feras95p
8 - Asteroid

Hi @RolandSchubert ,

 

So, in the theory the formula is the total number of days between the first and the last order divided by the total number of orders correct? but in your formula you calculated the avg days between each visit of the customers or what? 

RolandSchubert
16 - Nebula
16 - Nebula

Hi @Feras95p ,

 

if you want to compare order frequency within time periods (i.e. using order frequency as a KPI) , I think the approach "Total number of days in period" / "Number of orders in period" is the more suitable approach. The approach I used (calculating the average as "average of days between orders") seems to be a better base value to predict "expected next visit", it focusses on the distance between orders instead off orders in period.

Let's assume, a customer order first to on 2019-01-01, second order on 2019-03-02 and third (last) order on 2019-12-17. The formula I used returns 175 days as an average of 60 (days between first and second order) and 290 (days between second and third order). From the experience of the first 3 orders, you would expect the customer to return in 175 days (average distance) after the third visit.

Anyway, if you want to classify customers by order frequency, both measures can be used, I've added the measures to the workflow.

 

Best,

 

Roland 

Labels