Hi, I have 3 QVDs, one for products, one for stock and one for forecasts. All are linked by stock code and load without errors.
I want to take the current month and next 2 months forecasts by stock code to create a rolling 3 month average of the forecast so I can calculate weeks cover.
I can get to the current month forecast using this as a variable =Month(Today()) and putting it in my set analysis, but cannot get it to add the next 2 months. All it seems to do is take the current month and add it up 3 times. Initially I thought what I had done had worked as I was looking at a code with a flat forecast, however when I checked a seasonal product where the forecast fluctuates I found the error.
Do I put something into the initial script or can I do what I need to as a measure?
This is a snapshot of how my data looks at the moment.
This is my forecast QVD:
LOAD
text(StockCode) as TSLCode,
ForecastSales,
Year(PeriodDate) as Year,
month(PeriodDate) as Month
FROM [lib://QVD/Forecast.QVD]
(qvd);