RebaseDateParamId: String;
The RebaseDateParamId property determines the parameter that sets a base period for calculating aggregation.
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 method of extended aggregation.
Sub Main;
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.Exeslicee);
(Model As IMetabaseObject).Save;
End Sub Main;
After executing the example the following model parameters are changed:
The level is used to calculate aggregation.
The frequency of calculation step of aggregation shift is set.
The parameter that sets the base period to calculate aggregation shift is determined.
The threshold for aggregation relevance is set.
Aggregation is calculated ignoring the missing data treatment method.
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: