I'm having trouble coming up with the profit percentage on an Invoice table. Here is what I have:
INVOICE::total - a number field that shows the sum of the invoice line items amount.
INVOICE::cost - a number field that shows the sum of the invoice line items cost.
INVOICE::profitPercent - a calculation field, returns a number: (total-cost) / total.
These work properly. I also have the following summary fields:
INVOICE::total_total - a summary field, Total of total
INVOICE::cost_total - a summary field, Total of cost
These are in the subsummary part and are also working properly.
Now I want to find the profit percentage from the subsummary fields. I put the INVOICE::profitPercent field in the sub-summary area but that didn't work. Then, I created another field:
INVOICE::profitPercentAvg - a summary field, Average of INVOICE::profitPercent. This is close but not exact. I've included two screenshots below. The biggest discrepancy is the first one where the percentage should be 63.73% but instead shows 68.75%
Can anyone shed any light on what I might be doing wrong?