7 Replies Latest reply on Apr 25, 2018 10:44 AM by simran johal

# Predict next order date

Hi All,

I am trying to predict next orderdate of a customer. what I am trying to do is to get Average of difference between orderdates for a product and then add that difference to most recent purchase date of a customer to get predicted date. Is there any better way of doing this in tableau. please see the attached sample workbook. Any help is appreciated

• ###### 1. Re: Predict next order date

Hi

ii returns this

this is the days between purchases

the table calculation is set up like this

the average is this

set up like this

and the next date is

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: Predict next order date

Hi.. Thank you so much for replying me out. This post help me but i would like to make my concepts more clear that for calculating jd avg days window average is taken and not normal average??

Thanks again for helping me out..:)

• ###### 3. Re: Predict next order date

? don't understand the " would like to make my concepts more clear that for calculating jd avg days window average is taken and not normal average??"

the use of Window average is because the "Days Calculation" are the result of a table calculation that restarts with each now product - to determine the "next" date the average likewise is dependent on the email/procut and needs to restart with each new product - hence the window_average

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 4. Re: Predict next order date

yeah using window average makes more sense , I was trying normal average..like for ProductCode A 326/4=82 DAYS..

• ###### 5. Re: Predict next order date

Hi Jim Dehner

I got into issue as I am not able to calculate jd avg days when there are more then one email address in my data.. And I have thousands of email addresses. I really apologies for not mentioning this part earlier in my workbook about multiple email addresses. Can you please help me out on how to calculate it. I have attached the sample workbook.

Thanks

• ###### 6. Re: Predict next order date

Ok

try changing the order in the Days count setup to this

then on the age days 2 steps

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 7. Re: Predict next order date

Thankyou so much..It worked