A demand forecast is the prediction of future capacity requirements likewise production/purchase planning, inventory management and so on. Demand forecasting helps you to determine consumer demand for goods and services using historical, statistical and/or current data.
The new version of AX (as well as previous versions) involves features of the demand forecasting tool. One of the most obvious difference between previous version is that AX 7 uses Azure Machine Learning technology instead of SSAS (SQL Server Analysis Services).
In this topic we will not cover manual creation of demand forecast against the product, we will generate statistical forecasts based on the history in the system.
On top of that we’ll dive in and take a look at the following features:
- Configuration Item allocation key
- Configuration Demand forecasting parameters, including: Forecast dimensions, Azure Machine Learning settings
- Redefining setting against the item allocation key
- Setting up transaction types that will be included into forecasting
- Generate statistical baseline forecast
- Adjust generated demand forecast
- Authorization adjusted demand forecast
Let’s walk through the setups.
Item allocation keys
On the whole, you need to segregate your products into different item groups. This splitting allows you to group items and manage them separately. Later on you will use created item allocation key for the generation baseline forecast (just to not calculate demand forecast for the all the items).
To set up item allocation keys, follow these steps:
- Click Inventory management > Setup > Forecast > Item allocation keys
- Click New to create a new item allocation key
3. Enter a unique identifier of the item allocation key and a name for the key.
4. Chose item from the drop-down (in case if there are only several items that you want to assign to the one group)
5. Or click Assign items (in case if there are multiple items that you want to assign to the one group)
5.1 Find needed items by filtering them
5.2 Multi-select needed items
5.3 Click right arrow button
5.4 As the result, all selected items will be added to the newly created item allocation key.
Demand forecasting parameters
You need to set up the demand forecasting parameters. To setup Demand forecasting parameters, follow these steps:
- Click Master planning > Setup > Demand forecasting > Demand forecasting parameters
- Specify Demand forecast unit. In this unit forecast will be calculated. Unit conversion between inventory unit and demand forecast unit is needed. If you don’t have conversion, the product will be ignored, but warning will be displayed.
- Specify type of inventory transactions which will be used for the forecasting.
- Specify Forecast strategy.
- Copy over historical demand will not use Azure machine learning algorithm, it will copy historical demand that was applied early and put to the newly created demand.
- Azure machine learning will use Azure machine learning algorithm and additional setting is needed.
In our case we will use AML – so leave as it is.
5. Switch to the Forecast dimensions fast tab and select dimensions that you will use for your forecasting.
6. Go to the AML tab. Here you need to setup access to the Azure machine learning web service.
7. Click on the Message details link on the yellow toolbar. Hint will be displayed.
8. Next you’ll need to proceed with steps that are advised.
9. Go to advised link.
10. Click Open in studio.
11. Chose the better option for you.
12. In our case I’ve chosen the most popular and clicked Sign in
13. Click OK button
The page with data flow for Demand forecasting will be shown
You can see here R script execution and you can change it if you want (in case if you have your own algorithm).
14. Run the experiment
Running process will be started.
Wait until it’s finished.
15. Deploy the web service
After it’s done, you will see the following page
16. Copy API key
17. Go back to the AX and paste to the Web service API key field
18. Return back to the AML studio and click Request / Response link
19. Copy everything until ‘execute’ word.
20. Go back to the AX and past to the Web service endpoint address
Since AX copy the historical demand to the storage and AML read this storage you will need to specify storage account.
Note: In case of Production you do not need storage, but for your box env you should create your own storage account. If you don’t create the storage account, you will see the error during forecast generating like it’s presented below.
So create the storage account. To do this, follow these steps:
- Go to the portal.azure.com and click New button
- Chose Data + Storage > Storage account
- Fill all necessary information and click Create
- Go to All resources.
- Select created storage account
- Remember Account name and press Access keys link.
- Copy key
- Go back to the AX.
- And fill the storage account information
Adjusted demand forecast
It’s a central place for the planner to make the decision regarding demand forecasting. In this form you can see all previously generated demand forecasts as well as generate a new one. Follow these steps to open this form:
- Click Master planning > Forecasting > Demand forecasting > Adjusted demand forecast
- To generate a new forecast for the new horizon chose Generate statistical baseline forecast (or you can go to the Master planning > Forecasting > Demand forecasting > Generate statistical baseline forecast)
Parameters of the operation:
- Horizon – range of dates that will be used for the historical demand (in case of none item transactions it will be useless)
- Start date of the forecast – from what date forecast will be generated
- On the Records to include tab specify your own allocation key (just to not generate demand forecast for all items)
- On the Advanced parameter specify Forecast horizon – for what period ahead you would like to generate demand forecast
Click OK and process will be started
When it’s done, you will see generated demand forecast
For the forecast dimension value, you can find forecast Qty.
You can hide some unnecessary dimensions to see high-level forecast. To hide specific dimensions, click Change forecast dimensions.
Highlight all unnecessary dimensions and press left arrow button.
After changing forecast dimensions, you will see the result. In our case as the result it’s grouped by Company, Allocation key, Item number and Site.
You can change Forecast horizon in this grid. Let’s say you would like to see only for two months. Click Forecast horizon button and change the horizon.
The grid will be updated accordingly.
Filtering is also available there.
If you want to drill generated forecast down, you can select corresponding line and press Forecast line details.
You can see visual appearance of Historical demand (if it was for previous forecast horizon), Historical forecast (if it was for previous forecast horizon), generated forecast, and confidence interval (range of values future demand is likely to take).
To see how accurate is the forecast. Go to Forecast FastTab and analyze MAPE (mean absolute percentage error value).
You can see accuracy for the past by going to the Historical demand FastTab and clicking Show accuracy button.
In our case it’s all not so informative as we want because we don’t have historical forecast. But here you can see:
AE – Absolute errors
APE – Absolute percentage error
Sometimes you need to adjust proposed/generated demand forecast so you can do it manually from several venues.
Demand forecast lines
In the Demand forecast lines you can see maximum level of granularity.
You can adjust Qty at line level, then Total quantity will be adjusted accordingly, but Original quantity will remain as it is.
If you have several items you can adjust them one by one, or just change the Total quantity (total qty in this case is aggregated value) and quantity for all lines will be adjusted accordingly (proportionally).
All changes are bolded out.
Once you’ve done with all corrections, you can get down to the authorization adjusted demand forecast. This operation will apply demand forecast against the product.
Authorization adjusted demand forecast
Specify the period that need to be authorized and click OK button
You’ll end up seeing the message.
To double-check authorized forecast, go to the released product
Click Inventory forecast and see that adjusted amount was applied
In an ideal word you need forecast to plan it using master planning. So let’s jump to the master planning procedure to see that authorized demand forecast influents to the master planning.
Chose Static plan (Dynamic pan will not be updated)
Change the plan to the Static and check the result.
Here we can see that demand forecast for the 8/1/2016 is covered by Planned Kanban, but it can be covered by Planned purchase order as well.
Let’s switch to the Planned orders and look at the order there.
Go to the Master planning > Master planning > Planned orders
Another feature that you can get with gathered data. You can get aggregated forecast and using Power BI analyze the data.
I hope this tutorial was beneficial!