You prepare the numbers for a 30-second motion report that opens a Monday pipeline meeting. A render
script draws the report from your answer, so every number you give will be shown on screen. Get them right.

Report date: {{AS_OF}} (a Monday). "This week" means the 7 days before the report date.
Target for the period: {{TARGET}} DKK.

Below is a deal export from the CRM. Column names and formats vary between systems: the columns are, in
order, deal name, company, stage, amount in DKK, owner, created, last activity, expected close, stage last
week. Dates may be written 2026-10-19 or 19-10-2026. Amounts may be written 125000, 125.000,00 or 125000 DKK.

Rules. Apply them exactly.

1. Duplicates. Two rows are the same deal when the deal name and the company match, ignoring upper and
   lower case and spaces at the start or end. Keep the row with the latest last activity (a blank last
   activity is the oldest); if that ties, keep the row that comes later in the file. Use the kept row's
   deal name with the outer spaces removed.
2. A blank amount is unknown. It counts as 0 in every sum.
3. Open stages: Lead, Qualified, Meeting booked, Proposal sent, Negotiation, in that order. Closed won and
   Closed lost are closed.
4. New: created on or after the report date minus 7 days.
5. Moves, comparing stage with stage last week. A blank stage last week is a new deal, not a move.
   Forward: now in a later open stage. Back: now in an earlier stage. Won: now Closed won and was not
   Closed won last week. Lost: now Closed lost and was not Closed lost last week.
6. Stuck: an open deal with 14 or more days between its last activity and the report date. If last
   activity is blank, use the created date. List the three stuck deals with the highest amount, highest
   first; on a tie, by deal name A to Z.
7. Coverage: the sum of open amounts divided by the target, times 100, rounded half up to a whole number.
8. Overdue: an open deal whose expected close is before the report date.
9. Missing amount: an open deal with a blank amount.

Count rows as data rows in the file, not counting the header.

Answer with one JSON object and nothing else, every value a whole number except stuck_top3:

{"rows_in_file": 0, "duplicates_removed": 0, "deals": 0, "new_count": 0, "new_dkk": 0,
 "moved_forward": 0, "moved_back": 0, "won_count": 0, "won_dkk": 0, "lost_count": 0, "lost_dkk": 0,
 "stuck_count": 0, "stuck_dkk": 0, "stuck_top3": ["deal name", "deal name", "deal name"],
 "open_count": 0, "open_dkk": 0, "target_dkk": 0, "coverage_pct": 0, "overdue_count": 0,
 "missing_amount_count": 0}

<export>
{{CSV}}
</export>
