Variable needed

Please see example data below

Payroll reference Pay Date Units
PAY1234 30/09/2021 56
PAY1234 31/10/2022 86
PAY1234 30/11/2023 95
PAY1999 30/09/2021 15
PAY1999 31/10/2022 88
PAY1999 30/11/2023 102

In query 2

Payroll reference Scale change date
PAY1234 01/03/2020
PAY1234 01/03/2021
PAY1234 01/03/2022
PAY1999 01/03/2020
PAY1999 01/03/2021
PAY1999 01/03/2021

I want to find how many units have been claimed since the LATEST “scale change date” for the payroll reference

Hope this is enough information??

Cheers

If you merge on payroll reference, something like
=Sum([Units]) Where ([Pay Date] > Max(Scale Change Date]) In ([Payroll Reference]))

Two caveats:
1/ I don’t have Webi in front of me to test (brackets might be in the wrong place)
2/ I don’t know what objects you will be putting in your table.