Skip to content

Monotonic Sequence

A monotonic sequence is a sequence of numbers that is either entirely non-increasing or non-decreasing. To check if a sequence is monotonic, you verify whether the sequence consistently increases or decreases throughout, without any changes in direction.

Rule configuration

Rule configuration for a monotonic sequence check refers to the set of conditions or rules that you apply to determine if a sequence is monotonic.

Order type Order type in a monotonic sequence check specifies the direction of the sequence. You can choose either:

  • Ascending
  • Descending

Strict In a strict monotonic sequence check, the sequence must either be strictly increasing (each element is greater than the previous one) or strictly decreasing (each element is less than the previous one). There must not be any equality between consecutive elements.

Success criteria

The success criteria for a monotonic sequence are met when the sequence is consistently either non-increasing or non-decreasing in the case of non-strict. It must be strictly increasing or decreasing in the case of strict, without any reversal in direction.

  • The success condition depends on how the Order Type is configured.
  • For example, a monotonic sequence is 1, 2, 3, 4, which is strictly increasing. Another example is 5, 4, 3, 2, which is strictly decreasing.

Configuration fields

  • Operator options

    Greater than

    Less than

    Equal to

    Between (requires specifying a start and end range)

  • Operator defines the comparison operation. You can choose Greater Than, Less Than, Equal To, or Between.

  • Value is the threshold used for the success criteria. It is required when you use the Greater Than, Less Than, or Equal To operators.

  • Value range is required only when the Between operator is selected. It specifies the start and end range.

  • Threshold type indicates whether the Value or Value Range should be considered as a percentage or an absolute count.

  • Allow null values determines if null values are permitted.

  • Check for match determines if data values align with predefined standards, formats, or reference values to ensure accuracy, consistency, and integrity.

Sample Input

IDCustomerNumber
1Aubrey83457
2Fallon23455
3FranklynFryer46573
4Kathleen96784
5JudieGreen

Sample rule configuration

  • Order type
  • Strict True

Sample success criteria configuration

  • Operator Less than
  • Value 50%
  • Threshold Type Absolute Count
  • Allow Null Values False

alt text

Sample Output

Column NameRule NameSuccess CountFailure CountWithin ThresholdNull Count
CustomerMonotonic Sequence Check41No0
CountryMonotonic Sequence Check23Yes1