The daily number is close, but never equal

The warehouse daily revenue figure and the finance system's daily figure differ by a small amount every day. Neither is drifting, the totals over a month are nearly identical, and no check has ever fired.

beginner · Transform

What you would do first

Answer before revealing anything. The value of the exercise is entirely in committing to a diagnosis you can be wrong about.

  1. 1Compare the two figures for a single day and then for a whole month. A gap that mostly disappears over a month, with daily differences that alternate in sign, is a boundary problem rather than a loss.
  2. 2Group the warehouse figure by hour and look at the first and last few hours of the day. The difference will be concentrated there.
  3. 3Read the column being used for attribution and find out what time zone it is stored in and what time zone it is being truncated to.
  4. 4Confirm with finance which boundary is authoritative for reporting. This is a policy question, not a technical one.

What is actually going on

The trap

The fix that looks right. Read it even if you got the answer — especially then.

Convert the entire warehouse to the reporting time zone so the numbers match. Every timestamp is now ambiguous twice a year at the daylight-saving boundary, every join to a system that stayed on UTC is subtly wrong, and the original UTC value — the only unambiguous one — is gone.

Resolution