Skip to content
News

How to reconcile two data exports with AI

A festival's booking and scanner exports disagree. Match the tickets, investigate the exceptions, and save decisions your team can use at the next event.

A stadium sits among dark stone terraces beside a mountain lake.

At the end of a design festival, the registration system shows who booked each session and the scanners show who came through the doors. The events team wants to know how many people attended the print workshop. One ticket was scanned twice. Another appears in the scan export for a different session than the one on the booking. If the team counts rows or asks an AI to estimate from the two spreadsheets, it can easily produce a number nobody can explain next Monday.

To reconcile two data exports, agree on what one record represents, match rows with a rule you can run again, and investigate the rows that don't fit. A spreadsheet tool or script should do the matching and counting. A connected agent can help you understand the exceptions, track down the records you need to check, and remember how the team resolved them the next time the same exports arrive.

Work out what each export is counting

In this fictional festival, a row in the booking export represents a ticket. A row in the scanner export represents an attempt to scan one. A person can scan the same ticket twice while getting through a door, so the scanner's row count is not an attendance count. Decide whether your report is counting people, tickets or attendance at individual sessions. A person who attended two talks counts once in total visitors and twice in session attendance.

Write down which event each file covers and when it was exported. If a ticket transfer was recorded after one export but before the other, both reports might be accurate for the time they were produced. Keeping the cutoff time with the file will make that case much easier to spot. Note which system records cancellations and whether a scan marked as rejected appears in the export. If people use the same column name to mean different things, a small data dictionary can capture the agreed meaning and the source to check.

Match the records before asking what went wrong

Match the event and ticket code first. In this example each active ticket is issued for one session, so compare the booked session with the scanned session after matching the ticket code. Include the event identifier if ticket codes can repeat at different events. Preserve identifiers as text so an import doesn't remove leading zeroes. Check that your booking key is unique before joining; if two active bookings have the same key, stop and find out which record the team should use.

In Excel, Power Query's full outer join can retain records that appear in either export. Keep the scan events in the original file. For the pass that matches tickets, group them by event and ticket code and retain the scan count and observed sessions. That gives you one row per scanned ticket without hiding a scan at a second session. If you work in SQL or a script, the same check applies: compare across keys at the level you intend to count, and retain the underlying rows so you can trace a number back to the source.

Here are the results for a small set of fictional records from one event:

TicketBooking exportScanner exportWhat to record
A184Active, print workshopTwo scans at the print workshopOne confirmed ticket in that session; keep both scan events.
A185Active, print workshopOne scan at the design talkSession mismatch; check the transfer record.
A186Canceled, print workshopNo scanExcluded from the active booking count.
A187Active, design talkNo scanNo scan in this export; check whether the door data is complete.
A188No booking recordOne scan at the print workshopNo matching booking in this export; check the ticket source.

There are four booking records, three active bookings and four scan events across three distinct ticket codes. Only A184 matches an active booking and the booked session. Those counts describe this set of records before anyone investigates the exceptions. They leave room for a teammate to find an approved transfer or a missing scan file without quietly changing what was reported earlier.

Two workstations are visible through a ceramic floor lattice.

Let the agent pick up the investigation

Give the agent the comparison output, the matching rule and only the source records it has permission to read. Ask where each discrepancy first appears, what would explain it, and which record could settle it. Require the ticket code and source for every proposed explanation. For A185, the registration lead can confirm a transfer from an approved change record. A scan at a different session might tell you where someone presented the ticket, but it doesn't tell you whether the change was approved. Leave that row open if the source record isn't available.

This is also where you can catch cases that would distort later analysis. If one scanner's export is incomplete, a list of tickets with no scan can't tell you who stayed home. Once you've checked coverage, you can start asking what the data says about attendance. Until then, report what you can count and tell readers which venue or time period is missing.

A pale panel reveals a fibrous material along its fractured edge.

Keep the rules with the exceptions you resolved

In a private Swarm Space, attach approved CSVs or keep links to controlled exports. Save the comparison rules and the reviewed exception list as records the next person can open. A connected agent can read the permitted records from its own tool and save a draft for the event lead to check. For each reviewed exception, keep the original row identifiers, the evidence that resolved it and the decision. Avoid bringing names or contact details into the Space if a ticket ID is enough to do the work.

When you get the next pair of exports, use the same rules and open the prior exception list before starting. If organizers change the ticket format or begin offering tickets that cover multiple sessions, record the rule change with the workflow and note which reports it affects. An exception you fixed by hand last month should become a matching rule only if the team can explain when that rule is valid.

A narrow platform crosses between large trees above a dense green forest floor.

For a first pass, take two small exports your team has already reconciled. Run the match, then compare the agent's proposed explanations with the evidence your team used at the time. Save the rules and any disagreements in the Space. When the real exports arrive again, someone else should be able to pick up where you left off.

Swarm | Data reconciliation with AI: How to compare two exports