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

Calulating averages when some records are duplicate and some distinct 1

Status
Not open for further replies.
Jan 8, 2002
12
US
I am trying to calculate averages on fields where some records list as duplicates and others list as distinct. Using an average function yields an incorrect result since the multiple records are counted more than once. For example:

Category A 7.40
Category B 10.00
10.00
Average 9.13

Obviously this average is not correct, since it counts the 10.00 twice. Suppressing duplicates does not work, nor do formulas based on a count, nor does the @null formula referenced in FAQ 149-1489. How can I calculate correct averages?
 
Group on Category, create a running total (average type)
and set the Evaluate option to 'On Change of' Category.

Cheers,
- Ido CUT (Crystal UTilities): e-mailing, exporting, electronic bursting & distribution of Crystal Reports:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top