• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Update Real Time Forecast upper and lower confidence bound

jonastiger

Member
Hi
I´m using forecast sheet sometimes to some ponctual tasks.
Now I have a table that is updated everyweek, but I can´t update forecast because range values (col B) are dynamic.

TIMELINEVALUESFORECASTLOWER CONF BOUNDUPPER CONF BOUND
17/03/2023619
24/03/2023774
31/03/2023828828828828
07/04/2023901861940
17/04/20239739121034
21/04/202310459551241

C5=FORECAST.ETS(A5,$B$2:$B$4,$A$2:$A$4,1,1,1)
D5=B5-FORECAST.ETS.CONFINT(A5,$B$2:$B$4,$A$2:$A$4,0.95,1,1,1)
E5=B5+FORECAST.ETS.CONFINT(A5,$B$2:$B$4,$A$2:$A$4,0.95,1,1,1)


Now, if I update tha table and B5 fills with 930, for example, the locked ranges in formulas shoud be updated to $B$2:$B$5,$A$2:$A$5.
I tried dynamic ranges such as $B$2:$B5,$A$2:$A5, but it seems not work.

Is there a way to update forecast bypassing the lock the range values and not forcing a new forecast sheet everyweek?

Thank you in advance
 
If you use Excel 365 it is possible to set the forecast columns up to be a single dynamic array,
83756
where the Lambda function
= Forecastλ(timeline, valueColumn)
is defined by
Code:
= LET(
    actualsCount,   XMATCH(TRUE, ISNUMBER(valueColumn), 0, -1),
    actualsPeriod,  TAKE(timeline, actualsCount),
    forecastPeriod, DROP(timeline, actualsCount),
    actualsValues,  TAKE(valueColumn, actualsCount),
    forecastValue,  FORECAST.ETS(forecastPeriod, actualsValues, actualsPeriod, 1, 1, 1),
    confidenceInt,  FORECAST.ETS.CONFINT(forecastPeriod, actualsValues, actualsPeriod, 95%, 1, 1, 1),
    lowerCBound,    forecastValue - confidenceInt,
    upperCBound,    forecastValue + confidenceInt,
    actuals,        CHOOSECOLS(actualsValues, 1, 1, 1),
    forecast,       HSTACK(forecastValue, lowerCBound, upperCBound),
    VSTACK(actuals, forecast)
  )
It reads the value column to identify the last actuals period and then evaluates the corresponding time periods, both actual and forecast. Standard formulas provide the forecast and the confidence interval. These are combined and stacked to give the entire forecast array starting at 17/03/2023.
 

Attachments

Back
Top