|Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)
Part Number A86720-01
Working with Models, 8 of 8
Instead of calculating a single set of figures for a month and division, you might want to calculate several sets of figures, each based on different assumptions.
You can define a scenario model that calculates and stores forecast or budget figures based on different sets of input figures. For example, you might want to calculate profit based on "optimistic," "pessimistic," and "best-guess" figures.
To build a scenario model, you follow these steps.
Suppose, for example, you want to calculate profit figures based on optimistic, pessimistic, and best-guess revenue figures for each division. The steps for building this scenario model are explained in the next few sections.
You can call the scenario dimension SCENARIO, and give it values that represent the scenarios you want to calculate. For this example you can give it the values OPTIMISTIC, PESSIMISTIC and BESTGUESS.
define scenario dimension text ld Names of scenarios maintain scenario add optimistic pessimistic bestguess
For this example the solution variable should be dimensioned by DIVISION as well as by SCENARIO. Like the BUDGET variable in the
demo analytic workspace, your solution variable can also be dimensioned by MONTH and by LINE. You can call the variable PLAN.
For this example, you need to enter input data, such as revenue and cost of goods sold, into the PLAN variable.
For the best-guess data, you can use the data in the BUDGET variable. Limit the LINE dimension to the input line items, and then copy the BUDGET data into the PLAN variable.
limit scenario to 'BESTGUESS' limit line to 'REVENUE' 'COGS' 'MARKETING' 'SELLING' 'R.D' plan = budget
You might want to base the optimistic and pessimistic data on the best-guess data. For example, optimistic data might be 15 percent higher than best-guess data, and pessimistic data might be 12 percent less than best-guess data. With LINE still limited to the input line items, execute the following commands.
plan(scenario 'OPTIMISTIC') = 1.15 * plan(scenario 'BESTGUESS') plan(scenario 'PESSIMISTIC') = .88 * plan(scenario 'BESTGUESS')
The final step in building a scenario model is to write a model that calculates results based on input data. The model might contain calculations very similar to those in the BUDGET.CALC model shown earlier in this chapter.
You can use the same equations for each scenario or you can use different equations. For example, you might want to calculate the cost of goods sold and use a different constant factor in the calculation for each scenario. To use a different constant factor for each scenario, you can define a variable dimensioned by SCENARIO and place the appropriate values in the variable. If the name of your variable is COGSVAL, then your model might include the following equation for calculating the COGS line item.
By using variables dimensioned by SCENARIO, you can introduce a great deal of flexibility into your scenario model.
Similarly, you might want to use a different constant factor for each division. You can define a variable dimensioned by DIVISION to hold the values for each division. For example, if labor costs vary from division to division, then you might dimension COGSVAL by DIVISION as well as by SCENARIO.
When you run your model, you specify PLAN as the solution variable. For example, if your model is called SCENARIO.CALC, then you solve the model with this command.
A loop is performed automatically over the current status list of each of the dimensions of PLAN. Therefore, if the SCENARIO dimension is limited to ALL when you run the SCENARIO.CALC model, then the model is solved for all three scenarios -- OPTIMISTIC, PESSIMISTIC, and BESTGUESS.
For more information, see the following table.
|IF you want documentation about . . .||THEN see . . .|
overall understanding of the modeling capabilities of the OLAP DML,
the entry for the MODEL command in OLAP DML Reference
individual OLAP DML commands,
the entry for the command in OLAP DML Reference