IMDCalculationSliceFilter.Selection

Syntax

Selection: IDimSelection;

Description

The Selection property determines selection of elements used in calculation.

Comments

It is relevant if the Type property is set to MDCalculationSliceFilterType.Selection.

Example

Executing the example requires that the repository contains multidimensional calculation on database server with the MDCalc_1 identifier. A data consumer is based on a calendar dimension with the CALENDAR identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MDInst: IMDCalculationInstance;
    Args: IMDCalculationCalculateArgs;
    Filter: IMDCalculationSliceFilter;
Begin
    MB := MetabaseClass.Active;
    MDInst := MB.ItemById("MDCalc_1").Open(NullAs IMDCalculationInstance;
    Args := MDInst.CreateCalculateArgs;
    //filter using Selection
    Filter := Args.SliceFilter(MDInst.Calculation.Destination.Slices.FindById("CALENDAR"));
    Filter.Type := MDCalculationSliceFilterType.Selection;
    Filter.Selection.SelectElement(0True);
    Filter.Selection.SelectElement(32True);
    MDInst.Calculate(Args);
End Sub UserProc;

After executing the example multidimensional calculation is executed on DB server. Calculation is executed by the selected elements containing formulas.

See also:

IMDCalculationSliceFilter