-
Summing Groups
I am wanting to total the invoices of a particular Purchase Order (PO#). Then determine if the PO# falls into a specific category (formula field) based on the size of the order, or sum of invoices.
I have grouped the invoices under the PO# and set a summary for the group. Now I want to test whether the PO# total is < 5000 or >= 5000. Individually the invoices may not reach the $5000 threshold, but the sum may.
Ideally, this is the result I would like...
PO#______Invoice__________Category__________Sales
123______________________>= 5000__________5650.00
__123_____inv123___________< 5000__________2000.00
__123_____inv124___________< 5000___________150.00
__123_____inv125___________< 5000__________3500.00
I cannot figure this out.
-
Re: Summing Groups
See the help on the Sum() function. Put something like the following into the group header formula to set the category column:
local numbervar po_total := Sum({table.invoice_amount}, {table.po_number});
if po_total < 5000 then "xxx" else "yyy"