Reconcile amounts between datasets

Overview

Reconciliation is an optional part of the Join stage. It takes amounts from the Right dataset and allocates them across matching rows in the Left dataset. To allocate means to divide an amount between rows, following rules you choose.

The direction is fixed. If your amounts are in the dataset on the Left, swap the datasets in the Join configuration.

Reconciliation works in two stages:

  1. Right rows with the same join values are combined into one amount. Combining several values into one, such as adding them up, is called aggregating.
  2. That amount is allocated across the matching Left rows. Left rows are never combined.

Each Left row keeps its own values. The allocated amount is added in a new column, alongside information carried over from the Right rows.

When to use it

Use Reconciliation when one dataset holds amounts that need to be divided across rows in another. For example:

Any numeric amount can be allocated this way.

Reconciliation also changes how the Join behaves. A normal join produces an output row for every matching Left and Right combination, so three Left rows matching four Right rows give twelve rows. With Reconciliation on, the matching Right rows are combined first, so each matching Left row appears once, instead of once for every matching Right row.

Join points decide which rows belong together

Join points are pairs of columns, one from Left and one from Right, whose values must match. When you select more than one join point, all of them must match. For example:

On this page, an allocation group means the rows that have the same combination of join values. The Right rows in a group are combined into one amount, which is then allocated across the Left rows in the same group. ‘Allocation ID’ is just an example column name. Use whichever columns identify your groups.

Because every join point must match, two clients using the same Allocation ID stay in separate groups when Client ref is also a join point.

Choose the right level of matching

The join points you choose decide how amounts are grouped and where they can go:

Quantemplate doesn’t choose the level for you. Pick the join points that match how your amounts should be allocated.

Your datasets don’t need to be grouped or sorted first. Reconciliation groups the Right rows using the join points, and orders the Left rows using the Row Order setting.

Set up Reconciliation

Reconciliation panel in the Join stage, turned on, described as Allocate values from the Right across matching rows in the Left dataset. Under Right: Allocation column Paid amount with Sum, and Aggregate other columns using Payment date, Latest. Under Left: Allocation method Pro rata using Allocation weight, Row Order Due date, Earliest, and Maximum each row can receive set to Invoice amount. Under Output column: Allocated amount, with Rounding 2dp (0.00).
  1. In the Join stage, put the dataset with the amounts on the Right and the receiving rows on the Left.
  2. Select the join points that define your allocation groups.
  3. Turn on the Reconciliation switch. Choosing its settings without turning it on has no effect.
  4. Under Right, choose the Allocation column and how to combine it, and the reference column for Aggregate other columns.
  5. Under Left, choose the Allocation method, the Row Order and the Maximum each row can receive.
  6. Name the Output column and check the Rounding.
  7. Run the pipeline.

Right dataset settings

Right settings. Allocation column: Paid amount, with Sum selected. Notes read Allocate values to matching rows in Left dataset, and Rows in the Right dataset with identical join values will be aggregated prior to allocation. Aggregate other columns: Choose a reference column to pick a value when aggregating the other right columns, set to Payment date, Latest.

Allocation column

Choose the numeric column in the Right dataset that holds the amounts to allocate, then choose how to combine the amounts in each allocation group:

Option
Amount allocated
Payments of 60, 30 and 30
Sum
The total of the amounts
120
Mean
The average of the amounts
40
Max
The largest amount
60
Min
The smallest amount
30

Sum is the usual choice for payments. Each Right row counts once, even when two rows have the same amount: two payments of 45 make 90.

Aggregate other columns

The other Right columns, such as a payment ID, date or status, can’t be added up. Instead, Reconciliation picks one Right row from each group and keeps all its other values. Choose the reference column used to pick that row, then which value to pick: Earliest or Latest for a date column, or Largest or Smallest for any other column.

For example, a group has three payments:

Payment ID
Paid amount
Payment date
Outstanding amount
P-01
50
1 November 2026
100
P-02
30
2 November 2026
70
P-03
20
3 November 2026
50

With Paid amount set to Sum, and Payment date set to Latest, the group becomes:

Payment ID
Paid amount
Payment date
Outstanding amount
P-03
100
3 November 2026
50

Paid amount is the total of all three payments. Every other value comes from P-03, the latest payment. The other columns are not added up or picked separately.

This is useful for information that changes over time, such as a running balance or a status. The retained Outstanding amount is the value from the source data. Reconciliation doesn’t calculate a new balance for each receiving row from it.

Left dataset settings

Left settings. Allocation method: Pro rata, described as Rows with larger values in the pro rata column receive larger amounts, using the Allocation weight column. Row Order: Rows receive their amount in this order, set to Due date, Earliest. Maximum each row can receive: Choose the column that sets each receiving row's maximum amount, set to Invoice amount.

Allocation method

Choose how each group’s amount is divided between its matching Left rows.

In order

The whole amount goes to the first row in the Row Order. If rows have a maximum, the first row is filled up to its maximum, then the next row, and so on, until the amount runs out or every row is full.

Equally

The amount is divided equally between the matching rows. If a row would receive more than its maximum, it gets its maximum and the excess is divided equally between the rows that still have room. This continues until the amount runs out or every row is full, so rows with different maximums can end up with different amounts.

Pro rata

Pro rata means ‘in proportion’. Choose a numeric Left column to set each row’s proportion, often called its weight. Rows with larger values receive larger amounts: before any maximums apply, a row with a value of 2 receives twice as much as a row with a value of 1.

If a row reaches its maximum, it stops receiving. The rest is allocated between the other rows, still in proportion to their values.

A row with a weight of zero receives nothing under Pro rata, although the same row could receive an amount under Equally or In order. The pro rata column and the maximum column can be different columns.

Row Order

Choose a Left column, and which rows come first: Earliest or Latest for a date column, or Largest or Smallest for any other column. For example, Due date, Earliest puts the oldest invoices first. You can also choose Original row order to keep the order the rows have in the Left dataset.

Row Order is separate from the reference column under Aggregate other columns. There, Payment date, Latest picks which Right row supplies the retained information. Here, Due date, Earliest picks which Left row comes first for allocation.

Row Order only affects allocation. The output rows can appear in a different order.

Maximum each row can receive

Choose a numeric Left column that sets the most each row can receive, such as Invoice amount, or choose No maximum.

Compare the allocation methods

One allocation group has 180 to allocate. It matches three Left rows, shown in Row Order:

Row
Maximum
Pro rata value
A
30
3
B
120
2
C
180
1

Without maximums

Method
A
B
C
In order
180
0
0
Equally
60
60
60
Pro rata
90
60
30

With maximums

Method
A
B
C
In order
30
120
30
Equally
30
75
75
Pro rata
30
100
50

In every case, all 180 is allocated. The maximums total 330, so the group is 150 short of filling them. Surplus is −150, recorded on row A.

Output

Output column settings, with the column named Allocated amount and Rounding set to 2dp (0.00).

Allocated amount

The output column holds the amount allocated to each receiving row. You can give it any name.

Your Left columns stay as they are. The combined and retained Right columns appear alongside them, according to the Join’s output column settings. The combined Right amount is repeated on every matching row in the group. It’s the same group total each time, not extra money.

Total the Allocated amount column
To find the total allocated, add up the Allocated amount column. Don’t add up the Right amount column across the joined rows, because it repeats on every row in the group.

Surplus

The output also has a Surplus column. When rows have maximums, it compares the group’s amount with the total of the receiving rows’ maximums:

Surplus = amount available − total of the maximums

Surplus
Meaning
Example
Positive
Amount left over after every row is full
120 available, maximums total 50: Surplus 70
Negative
A deficit: how much more is needed to fill every row
100 available, maximums total 300: Surplus −200
Zero
The amount exactly fills the maximums
150 available, maximums total 150: Surplus 0

A negative Surplus doesn’t mean anything was left unallocated. All the money may have been allocated, with rows still below their maximum.

Surplus is a figure for the whole group, but it is recorded once, on the first receiving row in the Row Order. The group’s other rows show zero. With No maximum, the whole amount is allocated and Surplus is zero.

Refunds and negative amounts

Negative amounts, such as refunds, can be allocated too. They follow the allocation method, but maximums don’t limit them. For example, −60 across three rows:

Method
Row 1
Row 2
Row 3
In order
−60
0
0
Equally
−20
−20
−20
Pro rata, weights 1, 2, 3
−10
−20
−30

These results are the same even if each row has a maximum of 10.

When a negative amount is fully allocated, Surplus is zero. It isn’t compared against the rows’ maximums, so it never shows a deficit. Reconciliation doesn’t reverse earlier allocations or find the original payment behind a refund. If you need the balance still owed, calculate it separately from your business data.

Rounding

Rounding sets how the allocated amounts are rounded:

For example, with 2dp, 100 divided equally across three rows gives:

Row
Allocated amount
1
33.34
2
33.33
3
33.33

The total is still 100, and the first row in the Row Order receives the extra 0.01.

When a group has only one receiving row

If a group matches only one Left row, the whole amount goes to that row, subject to its maximum and the rules for negative amounts. So several Right rows, such as five payment instalments, can become one amount allocated to one invoice. Whether payments are allocated to one invoice or across several depends on the join points you choose.

Example: allocating payments to invoices

A client, C-100, has made three payments and has three open invoices. Payments should pay off the oldest invoices first, up to each invoice’s amount.

Right: payments

Client ref
Payment ID
Paid amount
Payment date
C-100
P-01
50
1 November 2026
C-100
P-02
30
2 November 2026
C-100
P-03
20
3 November 2026

Left: invoices

Client ref
Invoice
Due date
Invoice amount
C-100
INV-1
10 October 2026
40
C-100
INV-2
20 October 2026
50
C-100
INV-3
5 November 2026
60

Settings

Output

Invoice
Invoice amount
Paid amount
Payment ID
Allocated amount
Surplus
INV-1
40
100
P-03
40
−50
INV-2
50
100
P-03
50
0
INV-3
60
100
P-03
10
0

Troubleshooting

Symptom
What to check
Too many rows, and no Allocated amount column
Check the Reconciliation switch is turned on, then run the pipeline again.
Amounts go to the wrong end of the date order
Check Earliest or Latest under Row Order.
An old balance or status is kept
Check the reference column and Latest under Aggregate other columns.
Equal allocations aren’t equal
One or more rows may have reached their maximum.
A row gets zero under Pro rata
Check whether its pro rata value is zero.
Payment totals look too high
The combined Right amount repeats on every row in a group. Total the Allocated amount column instead.
Results still reflect old settings
Run the pipeline again and download a fresh export.
Surplus is negative although all payments were allocated
This is a deficit: the amount still needed to fill the rows’ maximums.
A fully allocated refund shows zero Surplus
This is expected. Negative amounts don’t create a deficit.

Quick reference

Setting
Purpose
Reconciliation switch
Turns Reconciliation on for this Join.
Join points
Decide which Right and Left rows form an allocation group.
Allocation column
The Right amounts to allocate, and how they are combined: Sum, Mean, Max or Min.
Aggregate other columns
Picks one Right row per group, by Earliest, Latest, Largest or Smallest, to supply the other Right values.
Allocation method
How the amount is divided: In order, Equally or Pro rata.
Pro rata column
The Left values that set each row’s proportion.
Row Order
Which Left rows come first for allocation, rounding and Surplus: Earliest, Latest, Largest, Smallest or Original row order.
Maximum each row can receive
The most each Left row can receive, or No maximum.
Output column
Names the column holding each row’s allocated amount.
Rounding
How allocated amounts are rounded: None, Integer (0) or 2dp (0.00).
Surplus
Output column: amount left over, or short, against the maximums, once per group.