Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following in the script:
.....
Left Join (Facts)
LOAD %ITEM_SKU_KEY,
%WEEK_KEY,
Forecast
FROM
Econ\Sales Units Forecast.xlsx
Left Join (Facts)
LOAD %ITEM_SKU_KEY,
if(%WEEK_KEY=52, 1, %WEEK_KEY+1) as %WEEK_KEY,
Forecast as ForecastBack
FROM
Econ\Sales Units Forecast.xlsx
Left Join (Facts)
LOAD %ITEM_SKU_KEY,
if(%WEEK_KEY=1, 52, %WEEK_KEY-1) as %WEEK_KEY,
Forecast as ForecastForward
FROM
Econ\Sales Units Forecast.xlsx
I need to add the following "ForecastX" field to the "Facts" table, which is calculated based on the "ForecastBack" and "ForecastForward" fields, which were created earlier in the script (see above).
The "ForecastX" is defined to be:
ForecastX = 0.5*ForecastBack + 0.5*ForecastForward
Any idea?
Thanks
Try this: LEFT JOIN(Facts) LOAD 0.5*ForecastBack+0.5*ForecastForward as ForecastX RESIDENT Facts;
Try this: LEFT JOIN(Facts) LOAD 0.5*ForecastBack+0.5*ForecastForward as ForecastX RESIDENT Facts;