IChronologicalMatrixLevelAggregator.SourceLevel

Syntax

SourceLevel: IDimLevel;

Description

The SourceLevel property determines level of dimension, from which data is taken for aggregation.

Example

Executing the example requires that the repository contains a cube with the Cube_1 identifier. The cube includes the calendar dimension CALENDAR that contains several levels.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

StandCub: IStandardCube;

Man: IMatrixAggregatorManager;

Dim: IStandardCubeDimension;

Lvls: IDimLevels;

ChronAggr: IChronologicalMatrixAggregator;

LevAggr: IChronologicalMatrixLevelAggregator;

Dest: IStandardCubeDestination;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("CUBE_1").Edit;

StandCub := MObj As IStandardCube;

//Create a new aggregator

Man := New MatrixAggregatorManager.Create As IMatrixAggregatorManager;

//Basic aggregation mechanism

ChronAggr := Man.CreateAggregator("ChronologicalMatrixAggregator") As IChronologicalMatrixAggregator;

//For CALENDAR dimension

Dim := StandCub.Dimensions.FindById("CALENDAR");

Lvls := Dim.Dimension.Levels;

ChronAggr.Dimension := Dim.Dimension;

//For default levels

LevAggr := ChronAggr.LevelAggregation(Null);

LevAggr.Operation := ChronologicalAggregatorOperation.Mean;

//For the level next to last

LevAggr := ChronAggr.LevelAggregation(Lvls.Item(Lvls.Count - 2));

LevAggr.UseDefaultLevelAggregation := False;

LevAggr.Operation := ChronologicalAggregatorOperation.UniformDisaggregation;

LevAggr.SourceLevel := Lvls.Item(Lvls.Count - 1);

//Setup of aggregation by the first element of facts dimension

Dest := StandCub.Destinations.Item(0);

Dim.Aggregator(1, Dest) := ChronAggr;

MObj.Save;

End Sub Main;

After executing the example the aggregation for the CALENDAR dimension is set up in the cube. Chronological aggregation mechanism is used. Aggregation with the use of chronological mean is performed for default levels. Own settings are set for the level next to last. Uniform disaggregation to the last level is performed.

See also:

IChronologicalMatrixLevelAggregator