IMsCrossDimensionAggregationOptions.SkipIfWholeWeightIsEmpty

Syntax

SkipIfWholeWeightIsEmpty: Boolean;

Description

The SkipIfWholeWeightIsEmpty property determines whether a series is excluded from aggregation if all series weights are empty.

Comments

Available 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.

Example

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:

See also:

IMsCrossDimensionAggregationOptions