Sum Best Practices
Guidelines for getting reliable signal from Sum checks while keeping the noise (and the maintenance) low.
Use Sum when someone hands you a control total
The rule is at its best when the expected value comes from outside the data: a figure on the delivery note, a total agreed with the source system, a number the finance team signs off. Reconciling against a total you derived from the same table proves nothing.
Prefer whole numbers over amounts that went through arithmetic
Exact equality is unforgiving. Counts, units, and integer amounts in cents behave predictably; values that went through division or currency conversion rarely land on an exact figure. For those, Aggregation Comparison lets you state the comparison with an operator instead.
Scope the filter to exactly the rows the total covers
A control total almost always describes a slice: one delivery, one day, one account. Set the filter to that slice, and remember the total then has to be updated whenever the slice changes. A check whose expected value goes stale every day is a check people will archive.
Pair it with a per-row rule when you need to act on the anomaly
Sum tells you the total is wrong, not which rows caused it. Adding Not Null or Not Negative on the same field gives whoever triages somewhere to start.
Do not reach for coverage to soften the rule
The Coverage slider is part of the shared check form, but Sum compares one aggregate against one value, so moving it changes nothing: the check still fails on any difference and still reports a single Shape Anomaly. When the total is legitimately allowed to move, change the expected Sum, or use Aggregation Comparison to state the comparison with an operator.
Scope with a filter
When the rule only applies to part of the table (one segment, one channel, one period), express that with a filter clause. The filter removes the out-of-scope rows from evaluation entirely, and the expression is echoed in every anomaly message.
Route the anomalies to the right people
A failure usually points at the system that produced the value, not at the warehouse. Set an Anomaly Assignee from the team that owns that producer, and tag the check so related checks are easy to find.
See Also
-
Permissions
The team permission each action needs: view, create, edit, archive, restore, and delete.
-
How It Works
The complete reference: definition, field scope, the expected total, exact equality, NULL handling, filter behavior, and why coverage does not apply.
-
Anomaly Reporting
The Shape Anomaly the check produces, what the numbers mean, and why there are no source records to inspect.
-
Examples
Three production scenarios with sample data, the resulting anomaly message, and the SQL equivalent of what the check evaluates.