Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Total based on other Totals

Status
Not open for further replies.

crystalpro

Technical User
Jan 22, 2002
95
US
I create a report grouped by invoice # listing:
Customer Sales Cost Profit Gross Margin

The Sales, Cost, Profit and Gross Margin are all created with a formula.

I summed the Sales, Cost and Profit columns.

I need to get a total for the Gross Margin column based on the Sales and Profit totals:
Gross Margin = Sum {Sales} / Sum {Profit}.

I've tried running totals but I didn't get the results I needed. How can I accomplish this?
 
I am assuming you want these totals as report totals. In which case, add a grand total for Sales, a Grand total for Profit. Then create the formula:

@RF_GrossProfit
Sum(Sales) / Sum(Profit)

Insert this into your Report Footer section. Steve Phillips, Crystal Consultant
 
If you're doing this at the Invoice# level, just create a formula for the group footer and select the sums that you already created from the Report Fields (summaries create entries there which you can use in formulas) and apply your math.

-k
kai@informeddatadecisions.com
 
The formula worked great for the subtotal and report total once I reversed the order to:

Gross Margin = Sum {@Profit} / Sum {@Sales}

Thank you so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top