The example describes creation of the Cube of Socio-Economic Indicators cube.
To create a cube:
Make sure that the repository contains the dictionaries:
Select the item:
The Create > Cube item in the context menu of the object navigator.
The New Object > Cube item in the Create group of the Home ribbon tab.
After executing these actions a dialog box of general cube creation wizard opens:
Use the Basic Properties page to specify the cube standard parameters:
Name: Cube of Socio-Economic Indicators.
Identifier: CUBE_SEP.
The list of object parameters is set on the Parameters page. This example does not require adding of cube parameters.
Select the radio button next to the Standard Cube item on the Object Type dialog box.
Go to the Cube Facts dialog box:
Select the Define List of Facts and Their Hierarchy Locally for Cube radio button.
Then add two elements with the Value and the Change names. To do this, click the Add Item button.
Go to the Cube Facts Binding page.
The left part of the page shows the hierarchical list containing all tables and their fields. The right part of the dialog box contains a list of cube facts.
Link facts and corresponding data table fields in this dialog box. To do this, select the tables: Annual Data, Quarterly Data and Monthly Data in the left part of the dialog box. Then drag the Value field of each table to the Value factor.
Go to the Cube Dimensions page:
This wizard page is used to determine a list of dictionaries that included into a cube, and to bind them to data tables.
Click the Add button to add dictionaries. A standard dialog box for selecting a dictionary opens:
Select the following dictionaries:
Calendar.
Territories.
Socio-economic indicators.
Data types.
Bind the data table fields to dictionary levels. To do this, specify the index links for each dimension, and then bind required table fields to the selected index. To determine an index link, double-click the icon next to the required dimension in the Cube Dimensions list. The Select Index dialog box opens:
Drag the required table field and drop it to the dimension index.
Indicators binding
The Cube Dimensions page after dimension links are established looks as follows:
The Units and Indicators page is used to specify measurement units used by the user. This example does not require to determine units.
Go to the Relations dialog box:
To create a relation, click the Add button. Then change the relation name by clicking the Edit button. The Relation Properties dialog box opens:
Set the following parameters in the dialog box:
Name: Shift One Point Back.
Identifier: BEFORE.
Specify relation parameters for the Calendar sublevel. Select the Calendar sublevel and click the Edit button. The Relation Formula dialog box opens:
Select the Elements Back radio button in the dialog box and set the -1 value. The Expression area automatically generates the T.PREV formula.
Go to the Calculated Facts wizard page.
Specify a formula for the Change fact. Select the fact, and click the Edit button. The Calculable Fact dialog box opens:
Click the button next to the Formula box. The Expression Editor dialog box opens. Set the formula in the box: @[1] - BEFORE[@[1]].
The Manage Parameters page is used to specify formulas for nested object parameters. This example does not require specifying formulas for nested object parameters.
Go to the Aggregation dialog box:
By default, this page has a single display version created, name and identifier of which match name and identifier of the cube itself. Click the Add button to add a new display version. The Display Versions dialog box opens:
Set the following parameters in the dialog box:
Name: Aggregation in the Territories.
Identifier: AGR.
This example shows the Territories dimension data aggregated from lower to upper levels using the basic aggregation mechanism. The data from the Regions level is summed up and written on the Federal Districts level, and the data from the Federal Districts level is summed up and written on the Russian Federation level.
In the Display Versions drop-down list select the Aggregation in the Territories variant. In the Cube Facts for which Aggregation is Performed drop-down list select the Value option. In the cube dimension list select the Territories item and click the Edit button. A dialog box for setting up aggregation for the selected dimension opens.
Select the Aggregate Selected Elements Only checkbox to aggregate taking dimension selection into account.
Determine the following parameters by selecting a destination level one by one in the drop-down list:
Destination level | Aggregation method | Source level |
RF | AutoSum | FD |
FD | AutoSum | Region |
Deselect the Include Owner Value checkbox to aggregate without taking destination level value into account. The checkbox is selected by default.
The Never radio button is selected by default in the Save Non-Aggregated Data group; this means that aggregated data is always saved to destination level. Similar description of saving non-aggregated data is given in the Basic Aggregation Mechanism section.
Click the OK button to save dimension aggregation parameters.
The Aggregation wizard tab looks as follows:
Click the Finish button to exit the wizard.
Open obtained cube and do the following settings:
Place calendar and facts dimension in columns, selects several elements at the Years level in calendar, select all elements in fact dimension.
Place territories by rows, select elements located at different levels.
The rest dimensions must be located in fixed, set single selection for them.
If the settings are correct ant tables contains the required information, then on opening cube the table will look as follows:
The table will display initial data (the Value fact), calculated values (the Change fact) and data will be also aggregated from the region level to federal districts and country level.
See also: