Average on Top 20 records
-
- Posts: 4
- Joined: Tue Oct 10, 2017 12:44 pm
Average on Top 20 records
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
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__