IAutoCubeDimension.AggregatorHierarchies

Syntax

AggregatorHierarchies(Destination: IAutoCubeDestination): IMatrixAggregatorModelHierarchies

Parameters

Destination. Cube display version for which aggregation by alternative hierarchy levels must be set up.

Description

The AggregatorHierarchies property determines aggregation settings by levels of alternative hierarchy for the specified cube display option.

Example

Executing the example requires that the repository contains an automatic cube with the CUBE identifier. The first dimension uses the dictionary with configured alternative hierarchy.

Add links to the Metabase, Cubes, Dimensions, Matrix system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Cub: IAutoCube;
    Hiers: IMatrixAggregatorModelHierarchies;
    AggHier: IBasicMatrixAggregator;
    Dim: IAutoCubeDimension;
    Dest: IAutoCubeDestination;
    HierKey: Integer;
Begin
    MB := MetabaseClass.Active;
    
// Get cube for edit
    Cub := MB.ItemById("CUBE").Edit As IAutoCube;
    
// Get the first cube dimensions
    Dim := Cub.Dimensions.Item(0);
    
// Get parameters of cube display version
    Dest := Cub.Destinations.Item(0);
    
// Get the list of alternative hierarchies
    Hiers := Dim.AggregatorHierarchies(Dest);
    
// Add aggregation settings for alternative hierarchy dictionary
    HierKey := Dim.Dimension.Hierarchies.Item(0).Key;
    AggHier := Hiers.Add(HierKey) 
As IBasicMatrixAggregator;
    
// Change aggregation parameters
    AggHier.UseSelection := True;
    AggHier.DefaultLevelAggregation.Operation := BasicAggregatorOperation.Sum;
    
// Save changes to cube
    (Cub As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, aggregation parameters for the first alternative hierarchy of the specified dimension are added in the cube:

See also:

IAutoCubeDimension