Parent Child tables - and math

I am working on a app that has two tables:

donation items received (parent)
donation items given out (child)

What is the best way to subtract the qty given out in the child table from the qty received in the parent table?

I thought I could do this, but I keep getting errors:

[Qty] - [Related Donations Assignment Sheets][QtyGiven]

It would help to know what the errors are, but I can guess. Try this:

[Qty] - SUM([Related Donations Assignment Sheets][QtyGiven])

You’re a genius! I had sum in the very front and then took it away completely - ugh!

Kept getting this: Arithmetic expression ‘([Qty]-[Related Donations Assignment Sheets][QtyGiven])’ has inputs of an invalid type ‘Unknown’

Thank you!

1 Like

[Related Donations Assignment Sheets][QtyGiven] produces a List of QtyGiven column values from the rows referenced by [Related Donations Assignment Sheets]. You cannot subtract a list of values from a singular value. SUM(), however, specifically expects a list of values.

1 Like