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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

group summary used in formula 2

Status
Not open for further replies.

mmetze

Programmer
Oct 2, 2001
45
US
i have a report with the following 4 fields as illustrated below...


district members days average
====== ====== === =====
Northeast 10,000 10 1,000
Southeast 20,000 10 2,000


i have set up the report for grouping by district and members is a summary field that is grouped by district. i need to create a formula to calcuate the average for each district. how do i create a formula that contains a group summary?
 
Dear GoTigers,

You would create it the same way you created the Sum, you would just choose Average instead.

I assume that in the details you have a field with the value for members.

Click on members, and choose Insert Summary, in the drop down box, scroll down and choose Average, and then in the based on Group box select District.

Hope this helps,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
if the 10,000 is a subtotal on your report, it will be visible in the field list with a sigma (funny looking E) next to it. When you add this field to your formula is will look something like this:

Count( {Members}, {Disrtict} )

You can than treat like any numeric within this formula, so you could say:

Count( {Members}, {Disrtict} ) / {@days}

And get your average. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
thanks for the tips. i had finally accomplished this by using a global variable to hold the sum & pass to another formula. the 2 suggested approaches would be much easier to implement!

thanks again to both of you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top