IncludeChildren: Boolean;
The IncludeChildren property determines whether direct child elements values are used during aggregation.
If the property is set to True, direct child elements values are used during aggregation, otherwise, level elements values selected in the Include property are used. The property is set to False by default.
Executing the example requires that the repository contains a cube with the Cube_1 identifier. The cube includes the D_TO dimension that contains several levels.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
StandCub: IStandardCube;
Man: IMatrixAggregatorManager;
Dim: IStandardCubeDimension;
Lvls: IDimLevels;
Lvl: IDimLevel;
BasicAggr: IBasicMatrixAggregator;
LevAggr: IBasicMatrixLevelAggregator;
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
BasicAggr := Man.CreateAggregator("BasicMatrixAggregator") As IBasicMatrixAggregator;
//For dimension D_TO
Dim := StandCub.Dimensions.FindById("D_TO");
Lvls := Dim.Dimension.Levels;
BasicAggr.Dimension := Dim.Dimension;
//For all levels
For Each Lvl In Lvls Do
LevAggr := BasicAggr.LevelAggregation(Lvl);
LevAggr.UseDefaultLevelAggregation := False;
//Method - Actual mean
LevAggr.Operation := BasicAggregatorOperation.ActualMean;
//Child elements
LevAggr.IncludeChildren := True;
End For;
//Setup of aggregation by the first element of facts dimension
Dest := StandCub.Destinations.Item(0);
Dim.Aggregator(1, Dest) := BasicAggr;
MObj.Save;
End Sub Main;
After executing the example aggregation for the D_TO dimension is set up in the cube. For all levels, aggregation with the use of arithmetic mean method is used. Data of corresponding child elements is used during aggregation.
See also: