Skip to content

Monotonic Sequence

The Monotonic Sequence rule checks whether numeric values in a dataset are ordered consistently in either ascending or descending order.
This rule is commonly used to:

  • Validate time series data or version numbers for logical progression.
  • Detect data entry errors where numbers break expected order patterns.

Example Usage:
Ensure customer transaction numbers always increase in order of transaction date, or product prices decrease progressively in a markdown list.


Configuration Fields

Rule-Specific Configuration

Field NameDescriptionRequiredData Type / Options
Order TypeThe direction of the expected sequenceYesAscending, Descending
StrictWhether the sequence should be strictly monotonic (no equal consecutive values allowed)Yestrue / false

Success Criteria Configuration

This section defines how the rule’s outcome is measured against expected thresholds.

Field NameDescriptionRequiredOptions / Format
OperatorComparison operation for the result countYesGreaterThan, LessThan, EqualTo, Between
Threshold ValueValue for comparison (for GreaterThan, LessThan, EqualTo)ConditionalNumber
Threshold MinMinimum value (for Between operator)ConditionalNumber
Threshold MaxMaximum value (for Between operator)ConditionalNumber
Is PercentageWhether the threshold represents a percentage or an absolute countNotrue / false (default: false)
Allow NullsWhether null values are considered validNotrue / false (default: false)
Check For MatchWhen false, validates for negation of the conditionNotrue / false (default: true)

Sample Input Data

IDCustomerNumber
1Aubrey83457
2Fallon23455
3FranklynFryer46573
4Kathleen96784
5JudieGreen

Sample Configurations

Example 1: Ascending Monotonic Check (Strict)

Configuration FieldValue
ColumnNumber
Order TypeAscending
Stricttrue
OperatorLessThan
Threshold Value50
Is Percentagefalse
Allow Nullsfalse

Explanation:
Validates that the sequence of values in the Number column follows a strictly increasing order, and no more than 50 records can fail this check.


Example 2: Descending Non-Strict Monotonic Check

Configuration FieldValue
ColumnNumber
Order TypeDescending
Strictfalse
OperatorGreaterThan
Threshold Value80
Is Percentagetrue
Allow Nullstrue
Check For Matchtrue

Explanation:
Validates that at least 80% of values in the Number column follow a descending order, allowing equal consecutive values.


Sample Output

Column NameRule NameSuccess CountFailure CountNull CountWithin Threshold
NumberMonotonic Sequence Check410No
CustomerMonotonic Sequence Check231Yes