Get a summary calculation based on certain criteria
I am stuck on something. I have a layout that has general customer information. On the layout is a portal (sourced to a different related table that pulls up items to put in the portal). Below is a basic example of entries that could be made on the portal (pretend each word is a field entry and each line is a portal line entry):
Product A Series 2 $5.00
Product A Series 8 $10.00
Product B Series 6 $7.00
Product A Series 3 $3.00
I have a calculation set already to get the total of the portal dollar amount (in this case it would be $25.00).
What I am trying to get is a summary of only certain items in the portal. For example, I want to know the total dollar amount for all Product A entries in the portal (so in this case it would be $18.00).
I have a separate calculation field for all three of my product types (ex: Product A, Product B, and Product C). What I have set isn't working though.
For instance, my Product A field is set with a calculation of: If (Product::Product Type = "Product A"; Sum (Product::Amount))
All it returns is the value of the first portal line item for Product A ($5.00), not the total of all portal line items for Product A ($18.00).
Any thoughts on where I might be going wrong? I keep tweaking at it but seem to get farther away from my goal.