IValidationComponentMismatch.ComparisonType

Syntax

ComparisonType: ValidationRevisionComparisonType;

Description

The ComparisonType property determines the type of value change.

Comments

Series values can be checked for presence or absence of changes, for adding or deleting of values and for their increasing or decreasing.

Example

Executing the example requires that the repository contains the TSDB_VALIDATION_PARAMETERS time series database containing a validation rule with the VALIDATION identifier.

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

Sub UserProc;
Var
    Mb: IMetabase;
    RubrObj, ValObj: IMetabaseObjectDescriptor;
    ValFilter: IValidationFilter;
    ComponentMismatch: IValidationComponentMismatch;
    ComparisonValue: IValidationComparisonValue;
Begin
    Mb := MetabaseClass.Active;
    // Get time series database
    RubrObj := Mb.ItemById("TSDB_VALIDATION_PARAMETERS");
    // Get validation rule
    ValObj := Mb.ItemByIdNamespace("VALIDATION", RubrObj.Key).Edit;
    ValFilter := ValObj As IValidationFilter;
    // Specify that validation is executed by all levels of calendar frequency
    ValFilter.Level := DimCalendarLevel.None;
    // Specify validation type
    ValFilter.Kind := ValidationDetailsKind.ComponentMismatch;
    // Get the Components Deviation Analysis validation parameters
    ComponentMismatch := ValFilter.Details As IValidationComponentMismatch;
    // Set parameters of comparing the source and output series
    ComponentMismatch.ComparisonType := ValidationRevisionComparisonType.Change;
    ComparisonValue := ComponentMismatch.ComparisonValue;
    ComparisonValue.ComparisonOperator := ValidationComparisonOperator.More;
    ComparisonValue.Value1 := 5;
    ComparisonValue.Percentage := True;
    // Clear execution area and validation filter
    ComponentMismatch.SelectionTargetData.Clear;
    ComponentMismatch.SelectionFilter.Clear;
    // Save the rule
    (ValObj As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the Components Deviation Analysis validation rule is set up: series which value of change is more than five percents are detected.

See also:

IValidationComponentMismatch