Why joining data can inflate a business report total

Understand how a one-to-many relationship can repeat an amount and how to check the calculation.

Discuss reporting and analytics

Identify the level of each record

A report may combine one order with several order lines. Before adding values, decide whether each row represents an order, a line item or another unit. An order-level total and a line-level amount should not be treated as interchangeable.

Work through an example

Suppose one order has a total of £100 and three lines. Joining the order to its lines can produce three rows, each carrying the same £100 order total. Adding that repeated total gives £300 even though the order is still worth £100.

Choose a suitable calculation

The reporting team can calculate the order total once per order or aggregate the line values at the appropriate level, depending on the agreed definition. Do not simply remove apparently duplicate rows: two legitimate orders may have the same amount. If an order has three lines but only one order-level shipping charge, the report should not add that charge three times simply because of the join.

Reconcile with source records

Test an order with one line, an order with several lines and an order with no lines. Compare identifiers, counts and totals against the source, and agree how cancelled or amended orders are included. Record the calculation so users can reproduce it after the report changes.

Explore the service

Start a conversation

Let’s make it
work better.

Tell us about your people, systems or premises. We’ll discuss what you need and agree a practical next step.

This opens a draft in your email application. Review your enquiry and send it when you’re ready.