8 Replies Latest reply on Aug 3, 2018 12:03 PM by Guillermo Cabiro

# Max Date Forecast Calculation

I need to create a calculated field for the max date by code and only bring the corresponding forecast while ignoring the rest of the data.  Please take a look at the Excel sheet in which I manually created the last column needed by tableau calculation.

Thanks

• ###### 1. Re: Max Date Forecast Calculation

Hi Guillermo,

based on the excel only for stage D i am seeing forecast

Could you please explain why only stage D and what is the pattern because i see for stage D for ever 3 days intervals you are forecasting calculation showing the value

Could you please give more specifics so that it will be easy to crack

BR,

NB

• ###### 2. Re: Max Date Forecast Calculation

Hi Naveen, Thanks for the reply.

Please ignore the Stage. it could be any value other than D.  the important  part is to bring only the forecast numbers that correspond to the latest date for each code number.

• ###### 3. Re: Max Date Forecast Calculation

Hi Guillermo,

1) create a calculated field like below

2) Create validation calculated field to get the max date per code number

3) Drag the second calculated to filter, date to rows( exact date) and code number to rows as like below

Hope this helps kindly mark this answer as correct/helpful so that it will helpful to other and as well to close the thread

BR,

NB

1 of 1 people found this helpful
• ###### 4. Re: Max Date Forecast Calculation

Hi Guillermo,

You can use below logic to get the forecast for max date:

if [Date]=({FIXED [Code Number]:max([Date])}) then [Forecast] END

1 of 1 people found this helpful
• ###### 5. Re: Max Date Forecast Calculation

Hi, Guillermo

Once you create the calculation, drag it to filter and select true

Hope this helps

ZZ

1 of 1 people found this helpful
• ###### 6. Re: Max Date Forecast Calculation

Thanks Naveen for the prompt response.  It works!

Best Regards, Bill