Power Query: rebuild bank-PDF transactions split across rows
Updated · 4 min read
When Power Query splits one bank-PDF transaction across several rows, rebuild it from verified source-row boundaries, not by deleting every row with a blank amount. A continuation may contain the payment reference you need. Conversely, two payments on the same date must stay separate even when their amounts are equal.
This guide concerns a PDF that your Excel for Windows installation can open with the PDF connector. Connector availability varies by product and host. For an alternative PDF extraction path, LocalExtract processes one PDF locally into CSV; either output still needs comparison with the source.
The desktop apps export date, description, and amount as CSV. Open CSV in Excel to save an XLSX workbook. Statement support varies: verify the result against your own PDF.
Preserve the import before changing row boundaries
Microsoft’s PDF connector documentation describes selecting a PDF, choosing a detected table in Navigator and using Transform Data. Its multiline-row guidance identifies fill-down and grouping as possible tools, not universal repairs. Keep the original detected output and perform rebuilding in a separate query or working copy.
Record the original page, detected table and row order before sorting or grouping. Add a stable working row reference so every reconstructed transaction can point back to the rows you actually inspected. Those references are review metadata, not extra fields automatically supplied by LocalExtract or guaranteed by every PDF table.
Do not start by filling amounts down. That can turn a description continuation into an extra payment. Nor should you assume that every blank date belongs to the previous transaction: a page header, subtotal or unreadable transaction could also lack a usable date.
Map one cross-page description explicitly
The invented USD example below represents a checked source layout, not a real bank’s format. The reviewer has established that rows 1 and 2 describe the same transaction across a page boundary.
| Source row | Page | Verified transaction key | Description fragment | Amount |
|---|---|---|---|---|
| 1 | 1 | T1 | Fictional supplier | −80.00 USD |
| 2 | 2 | T1 | invoice reference A | Blank |
| 3 | 2 | T2 | Separate same-date payment | −80.00 USD |
| 4 | 2 | Unresolved | Unresolved note | Blank |
Rebuild T1 as “Fictional supplier invoice reference A”, retaining one −80.00 USD amount and references to rows 1–2. T2 remains a separate −80.00 USD payment. Row 4 stays in the unresolved set because the source has not established which event, if any, it belongs to.
The two established transactions total −160.00 USD. Filling row 2’s amount from row 1 would instead produce three −80.00 USD amounts, or −240.00 USD. Deleting row 2 would preserve the total but lose part of T1’s evidence. A balance check alone cannot distinguish those two failures.
Use grouping only after the mapping is justified
Create a working boundary key only after reading the PDF. Then inspect groups in source order. Microsoft documents Table.Group for grouping and Table.FillDown for carrying non-null values into null cells. Their availability does not establish which rows should share a bank transaction.
For each checked group:
- Keep the original source-row references and restore their explicit order before joining text.
- Combine only the description fragments belonging to that transaction.
- Require exactly one established transaction amount in this example’s layout; two amount-bearing rows require review rather than summing by default.
- Preserve T1 and T2 as different keys even though their date and amount could match.
- Keep unassigned rows visible for source clarification instead of forcing them into the preceding group.
Different source layouts may legitimately put an amount on a final line or use debit/credit columns. Confirm that layout first; the example’s single-amount rule is not a universal PDF parser.
Check cross-page behaviour separately from grouping
The PDF connector can combine similar tables on consecutive pages through MultiPageTables. It also offers StartPage and EndPage. These settings control table detection and page scope; they do not prove that a continuation belongs to the row above it. When testing a smaller page range, record the excluded pages and verify the complete statement before using the result.
The synthetic row-map exercise preserves all four source rows, the two rebuilt transactions and the held row. Python checks the grouping relationships and amount conservation. It does not execute Power Query, test a real PDF layout or certify a bank format.
Use the PDF-format guide for source structure and the Power Query file-combination guide for appending separate files. Those are different tasks from joining fragments of one transaction. Keep the final mapping and unresolved-row report with the original before preparing any accounting import.
LocalExtract exports date,description,amount one PDF at a time and does not infer your manual review keys or perform bookkeeping. Download LocalExtract for a PDF source.
Microsoft documentation checked on October 15, 2026.
LocalExtract Team
We build LocalExtract, a desktop bank statement converter. Questions or corrections? Contact · Editorial policy