IMsAggregationFilter.AggregationParamID

Syntax

AggregationParamID: String;

Description

The AggregationParamID property determines an identifier of the parameters that are used to determine aggregated elements.

Comments

If the property is set to a value, values of the IMsAggregationFilter.AggregationGroup and IMsAggregationFilter.AggregationSelection properties are reset.

Depending on the IMsAggregationFilter.UseParamAsGroup property value the parameter is considered as a separate element or a group of elements.

Example

Executing the example requires that the repository contains a time series database with the FC identifier. The modeling container of this database must contain a metamodel that contains the AGGR_PARAM parameter. The calculation chain of metamodel must contain a model with the MODEL_AGGR identifier that is calculated by the extended aggregation method. COUNTRY is the attribute of database time series that refers to the dictionary.

Add links to the Cubes, Dimensions, Metabase, Ms, Rds system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RubrDescr: IMetabaseObjectDescriptor;
    Rubr: IRubricator;
    msDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    Formula: IMsFormula;
    Aggr: IMsCrossDimensionAggregationTransform;
    FiltesList: IMsAggregationFilterList;
    Filter: IMsAggregationFilter;
    Attributes: IMetaAttributes;
    DictDescr: IMetabaseObjectDescriptor;
Begin
    // Get the current repository
    mb := MetabaseClass.Active;
    // Get TSDB
    RubrDescr := mb.ItemById("FC");
    Rubr := RubrDescr.Bind As IRubricator;
    msDescr := Rubr.ModelSpace;
    // Get model
    Model := mb.ItemByIdNamespace("MODEL_AGGR", msDescr.Key).Edit As IMsModel;
    // Get model calculation parameters
    Transform := Model.Transform;
    // Get model calculation method
    Formula := Transform.FormulaItem(0);
    // Get method parameters
    Aggr := Formula.Method As IMsCrossDimensionAggregationTransform;
    // Get aggregation filter
    FiltesList := Aggr.Filter;
    // Get dictionary attributes
    Attributes := Rubr.Facts.Attributes;
    DictDescr := Attributes.FindById("COUNTRY").ValuesObject;
    // Add filter
    Filter := FiltesList.Add(DictDescr.Bind As IDimensionModel);
    Filter.AggregationParamID := "Aggr_Param";
    // Save changes
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a new filter is added to the extended aggregation model: aggregation is calculated for elements that are determined by the AGGR_PARAM parameter.

See also:

IMsAggregationFilter