3 Replies Latest reply on Jun 1, 2018 6:02 AM by Lauren Brown

# Predicted sales for accounts that do not have a full rolling 12 months

I have a calculation that was created to show sales 12 months prior to buying a particular item.  Here is the calculation.

However, there are several accounts that do not have a full 12 months sales data going forward as they could have just started buying it January of 2018.

My challenge is I need to somehow show predicted sales for the accounts that do not show a full 12 months sales.

Can this be done?

Is it best to use Tableau Analytics? Or build off my current calculation?

• ###### 1. Re: Predicted sales for accounts that do not have a full rolling 12 months

Hello Lauren,

I'd build off that current calculation and do a comparison for max date to min date to get the number of months difference to use for each row.  The value in the calc could be set to if datediff('month',date,date) is >12 then 12 else datediff('month',date,date).  Then use this value in your place of your 12 there.  Maybe??

Patrick

• ###### 2. Re: Predicted sales for accounts that do not have a full rolling 12 months

Thank you Patrick, I will give that a try.

Lauren Brown

Sr Analyst, Sales Op Management - Sustainable Technologies

15 Hampshire Street Mansfield, MA 02048

508.261.8148 dir | 844.COVALUE field service

• ###### 3. Re: Predicted sales for accounts that do not have a full rolling 12 months

Patrick,

I am struggling with this calculation. Do I need to determine the months difference outside the calculation? I have hundreds of rows. or will what you provided me with below, determine the months difference?

datediff('month',date,date) is >12 then 12 else datediff('month',date,date)

The main thing is out of these hundreds of rows, all of them have different months sales, they are not all the same.

I am very new to these complex calculations and would appreciate any further insight to this!

Thank you!