SkipIfWholeWeightIsEmpty: Boolean;
The SkipIfWholeWeightIsEmpty property determines whether a series is excluded from aggregation if all series weights are empty.
Available values:
True. A series is excluded from aggregation if all weights for it are empty.
False. Default value. A series is taken into account on aggregation calculation regardless of weight values.
The weights are taken into account if the calculation uses a weighted aggregation method, for example, weighted sum. If there are any empty weight values, the result of aggregation is empty.
Executing the example requires that the repository contains a time series database with the TSDB identifier, which modeling container contains an extended aggregation model with the MODEL_AGGR identifier. The model is calculated by the weighted aggregation method.
Add links to the Cubes, Metabase, Ms system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
Rubr: IRubricator;
MsDescr: IMetabaseObjectDescriptor;
Model: IMsModel;
ModelFormula: IMsFormula;
CrossDimAggr: IMsCrossDimensionAggregationTransform;
AggrOptions: IMsCrossDimensionAggregationOptions;
Begin
Mb := MetabaseClass.Active;
Rubr := Mb.ItemById("TSDB").Bind As IRubricator;
MsDescr := Rubr.ModelSpace;
// Get extended aggregation model
Model := Mb.ItemByIdNamespace("MODEL_AGGR", MsDescr.Key).Edit As IMsModel;
ModelFormula := Model.Transform.FormulaItem(0);
CrossDimAggr := ModelFormula.Method As IMsCrossDimensionAggregationTransform;
// Change aggregation calculation parameters
AggrOptions := CrossDimAggr.Options;
// Exclude from aggregation series with all empty weights
AggrOptions.SkipIfWholeWeightIsEmpty := True;
// Set values for missing data substitution in calculation threshold data
AggrOptions.TreatEmptyCompositionRelevanceAs := 0;
// Exclude from aggregation series, which have missing data in weight values
AggrOptions.TreatEmptyWeightsAs := 0;
// Specify that aggregation is calculated in common data period
AggrOptions.UseCommon := True;
{ Impose constraint on minimum number of observations
in common data period are five values}
AggrOptions.UseNumObservations := True;
AggrOptions.NumObservations := 5;
// Save changes of model parameters
(Model As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, parameters of extended aggregation calculation are changed:
The series with all empty weights are excluded from aggregation calculation.
The series that have missing values in weights values are excluded from aggregation calculation.
The 0 value is used to substitute missing data in aggregation calculation threshold data.
Aggregation is calculated in the common data period.
Minimum number of observations in the common period is five.
See also: