Page 1 of 1

Average on Top 20 records

Posted: Sat May 27, 2006 8:07 pm
by Daisy_(Guest)
Hi,__I am trying to average on only the top 20 date fields in the database . How can I do that.____Thanks__Daisy

=> RE: Average on Top 20 records

Posted: Wed May 31, 2006 10:07 am
by kfleming
Here is an example of how to sum a numeric amount for records within the first 20 days in the report. What you want to do may be slightly different but the general technique would be the same.____Sort and group by date. Create a total field that counts the date field, accumulates once per date and resets at the grand level.__Then create a test calculated field with the expression:__IIF(COUNT>=20,amount,0)__Finally create a total field that sums the test field, accumulates for every record and resets at the grand level.____This will give you a sum of the amount for records that are in the first 20 dates.____Kathleen__R&R Support__