ICalculatedCubeClass.Shift

Syntax

Shift(Coord: ICalculatedCubeInstanceCoord; Lag: Integer): ICalculatedCubeInstanceCoord;

Parameters

Coord. The coordinate that must be shifted.

Lag. The lag, with which the coordinate must be shifted.

Description

The Shift method shifts coordinates by a calendar dimension with the specified lag.

Comments

This method is used in the user macro that calculate values by the current coordinate in a calculated cube.

Example

This example is a macro for a calculated cube.

Function TestFunction(InputCoord: ICalculatedCubeInstanceCoord): Variant;
Var
    Coord: ICalculatedCubeInstanceCoord;
    Difference: Double;
Begin
    Coord := CalculatedCube.Shift(InputCoord, -1);
    Difference := (Coord.Val As Double) - (InputCoord.Val As Double);
    Return Difference;
End Function TestFunction;

On executing the macro the calculation of difference between the previous and the current value is executed.

See also:

ICalculatedCubeClass