Skip to content

Aggregation Comparison Anomaly Reporting

How the Aggregation Comparison check reports a failed comparison: the anomaly message it produces, how the two evaluated values are rendered, and why per-row reporting does not apply to this rule.

Anomaly Messages

Aggregation Comparison emits Shape Anomalies only: one anomaly per failed comparison, never per row. When the comparison fails and both aggregates evaluated successfully, the message is:

The target expression '<expression>' evaluates to <target_value> which is not <comparison> the reference expression '<ref_expression>' value of <reference_value>

<comparison> is the long form of the operator: less than, less than or equal to, equal to, greater than or equal to, or greater than.

When either aggregate yields NULL, NaN, or an infinite value, that side renders as null/NaN in the message and the comparison is reported as failing.

When the target filter is set, the message ends with [filter: <expression>]. When the reference filter is set, it ends with [reference filter: <expression>]. Both suffixes can appear together, target first.

How the Values Are Rendered

Both evaluated values are shown in the message exactly as computed, with the formatting below:

  • Whole numbers drop the decimal part (1500, not 1500.00).
  • Fractional values keep their significant digits and drop trailing zeros (1500.75).
  • A value that could not be evaluated renders as null/NaN.

Rounding the expression itself (for example, ROUND(SUM(amount), 2)) is the reliable way to control precision on both sides of a reconciliation.

Source Records Behavior

Aggregation Comparison does not evaluate individual rows, so the Shape Anomaly carries no source records. The two evaluated values in the message are the evidence: compare them against the expressions to find where the reconciliation broke.

Custom Anomaly Description

Custom Anomaly Description does not apply to this rule. The option replaces the message on Record Anomalies, and Aggregation Comparison emits none. The toggle can still be set on the check form, but Shape Anomalies always use the fixed message described above.

See Also