The formula editor is used to set calculation formulas of the calculated cube. To open the formula editor, go to the Formula Editor page of the calculated cube wizard:

The areas are available in the formula editor:
The Period list includes all formula actual periods for the selected destination cube coordinate. A specific value calculation formula is specified for each period.
To add a period, click the
Add button. The period creation dialog box opens:

Specify period start and end dates in the dialog box.
NOTE. If the new period overlaps the existing ones, an appropriate message is displayed. If the answer is positive, a new period is added or edited, and all the periods completely contained within it are deleted and the periods partially contained in the new period are edited so that they do not overlap.
To edit the selected period, double-click on it. The dialog box opens that is similar to the one for period creation.
To delete the selected period, click the
Delete button.
A formula is set for a destination cube coordinate. Select all the cube dimensions to create a coordinate. Source cube coordinates are also used in expressions.
To add a source cube coordinate to the destination cube expression, select the source dimension element and click the
Insert into Formula button. As a result, the current position of the Expression box displays the expression element corresponding to source cube coordinate.
If a calculated cube uses a formula actual period, and there are no periods created for the selected coordinate of the destination cube, executing any of these operations opens a dialog box for creating a period.
When creating an expression one can use various mathematical functions and operations.
Mathematical functions and operations
TIP. To get examples of expressions, see the Examples section.
Closing the formula editor automatically saves the selected source cube, the order of the source cubes and destination cube dimensions, the selected dimension elements, the way the names are displayed in dimensions and formulas and the parameters, based on which the dimensions are built. On the next opening of the calculated cube formula editor it is opened using the saved settings.
To save the formula, click the Save button.
Application function can be used to calculate formulas. Function can contain any number of parameters (mandatory or optional) and must return any simple data type. Cube coordinates can be passed to the function. To do this, in the function signature, parameters with the ICalculatedCubeInstanceCoord. If a coordinate is specified in expression, the actual value by the specified coordinate will be sent to the function. Example: Calc_Functions.Sample1(Russia|2000). To send the coordinate to the function described by the ICalculatedCubeInstanceCoord interface, enter the @ character before the coordinate in the expression. Example: Calc_Functions.Sample2(@Russia|2000).
See also: