I'm concerned about this statement:
The Total Invoiced is a Summary Field from another layout.
Are you sure that it's a Summary field, not a calculation field?
Do you see the correct totals in that field for each portal row?
Is this an unfiltered portal? or a Filtered portal?
Depending on whether the portal is filtered or unfiltered, there are ways to show the total you want. But both as both methods will reference the Total Invoiced field, it's important to know exactly how that field is defined. "a summary field from another layout" is just to vague to know for sure what type of field you have set up and how it is currently computing the values shown.
Phil - correction - the Total Invoiced is a "Calculation" field - it sums the invoices against a single PO.
The Portal is unfiltered.
I'm almost sorry that I asked. You appear to be using different fields for your invoices instead of a set of related records. This is unlikely to be the best possible database design for you database.
Sum can also have this syntax: Sum ( relatedTable::Field )
Then it computes the total of Field across the entire set of related records--such as all the records shown in an unfiltered portal. But this ignores any portal filter used so a different approach is needed in cases where a portal filter reduces the actual set of records shown in the portal.
Thanks Phil, that worked perfectly. And you're right, I need to change the way I'm tracking my invoices. They were sort of an after thought.
I've since created a separate Table/Layout just for Invoices and will handle them as individual records with a relationship to the corresponding PO record. Some PO's have one invoice, others can have dozens.