IMsCrossDimensionAggregationOptions.RebaseDateParamId

Syntax

RebaseDateParamId: String;

Description

The RebaseDateParamId property determines the parameter that sets a base period for calculating aggregation.

Example

Executing the example requires that the repository contains a time series database with the FC identifier. A modeling container of this database must contain a metamodel that includes the RebDate_Param parameter. The calculation chain of metamodel must contain a model with the MODEL_AGGR identifier that is calculated by the extended aggregation method.

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

Sub UserProc;
Var
    mb: IMetabase;
    RubrDescr: IMetabaseObjectDescriptor;
    Rubr: IRubricator;
    msDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    Formula: IMsFormula;
    Aggr: IMsCrossDimensionAggregationTransform;
    strsGen: IMsFormulaStringGenerator;
    Options: IMsCrossDimensionAggregationOptions;
Begin
    mb := MetabaseClass.Active;
    RubrDescr := mb.ItemById("FC");
    Rubr := RubrDescr.Bind As IRubricator;
    msDescr := Rubr.ModelSpace;
    Model := mb.ItemByIdNamespace("MODEL_AGGR",msDescr.Key).Edit As IMsModel;
    Transform := Model.Transform;
    Formula := Transform.FormulaItem(0);
    Aggr := Formula.Method As IMsCrossDimensionAggregationTransform;
    Aggr.AgregationMethod:= MsAgregationMethodType.Sum;
    Options := Aggr.Options;
    Options.Threshold :=0;
    Options.Level := True;
    Options.Rebase := True;
    Options.RebaseDateParamId:= "RebDate_Param";
    Options.LevelValue := DimCalendarLevel.Year;
    Options.UseFillGaps := False;
    strsGen := Formula.CreateStringGenerator;
    strsGen.ShowFullVariableNames:= True;
    Debug.WriteLine("Aggregation expression: " + strsGen.Execute);
    (Model As IMetabaseObject).Save;
End Sub;

After executing the example the following model parameters will be changed:

The expression, by which aggregation is calculated, is displayed in the console window. For example:

Aggregation expression: World for publication|BCA[t] = Rebase(Level(Sum((BCA[t]) * (BCI[t])) / Sum(BCI[t])), RebDate_Param)

See also:

IMsCrossDimensionAggregationOptions