Shift(Coord: ICalculatedCubeInstanceCoord; Lag: Integer): ICalculatedCubeInstanceCoord;
Coord. The coordinate that must be shifted.
Lag. The lag, with which the coordinate must be shifted.
The Shift method shifts coordinates by a calendar dimension with the specified lag.
This method is used in the user macro that calculate values by the current coordinate in a calculated cube.
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: