Hi Leon!
At this time, summary tables can’t be called in formulas. This is something we would like to improve. In the meantime, we can use formulas to find the sums that are calculated in the summary tables then subtract the two to find the remaining amount. I created an example for you at the link below:
https://public.getgrist.com/rGhtxrAKCpKJ/Community-1152/m/fork
In the table ‘REMAINING’, I added a ‘Sum to Bill’ and ‘Sum Totals’ column so you can see that each part of the formula used in the remaining column does find the same value as the summary table for each.
The formula used to find the Sum To Bill is:
SUM(Billing_Total.lookupRecords().To_Bill)
This formula looks up all records in the Billing Total table and pulls the value for each record from the To Bill column then uses SUM() to sum all of the values found.
The formula used to find the Sum Totals is:
SUM(Payments.lookupRecords().totals)
This formula looks up all records in the Payments table and pulls the value for each record from the totals column then uses SUM() to sum all of the values found.
Now to find the Remaining value, we subtract the Payments value from the Billing Total value. Using the two formulas above, we can find the amount remaining.
The formula used to find the Remaining is:
SUM(Billing_Total.lookupRecords().To_Bill) - SUM(Payments.lookupRecords().totals)
Let me know if you have any other questions 