Relation(Dimension: IStandardCubeDimension): IExpression;
Dimension. Cube dimension that is used to determine relation.
The Relation property returns the cube relation expression by the specified dimension.
Specify any cube dimension different form facts dimension as the Dimension parameter value.
Executing the example requires a standard cube with the Stan_Cube identifier. The cube contains a calendar dimension with the CALENDAR identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
StandCub: IStandardCube;
Relat: IStandardCubeRelation;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Stan_Cube").Edit;
StandCub := MObj As IStandardCube;
Relat := StandCub.Relations.Add;
Relat.Id := "BEFORE_DOWN";
Relat.Name := One point back and down shift;
Relat.Relation(StandCub.Dimensions.FindById("CALENDAR")).AsString := "T.UP.UP";
MObj.Save;
End Sub Main;
After Example execution, new relation would be created for calendar cube dimension in a standard cube. Using this relation in calculated cube facts, the element located two levels up is chosen.
See also: