# Thread: Computing Average in Rpt Summary

1. ## Computing Average in Rpt Summary

I've been suspicious and just now created a sample that proves it. The "average" option used when a field is placed on a report includes null values in the computation. Should it not ignore a record in which the field being averages is null?

Thanks.

Eric Johnson

2. ## RE: Computing Average in Rpt Summary

Eric;
Unfortunately, in A5 to get your "true" average (i.e. excluding "0" or null values) you will have to create a calculated field, and then take its average [e.g. if(myfield>0,mycalcfield,0)].

Duncan

3. ## RE: Computing Average in Rpt Summary

Duncan,

I've done it a different way.

Just drag and drop a new calc field into the details band of the report. Use an expression like this:

If(your_field_value > 0, 1, 0)

this returns a 1 for each record that actually has a value greater than zero, and a zero for each that does not.

Now create a new calc summary field and total the values in the first calc field. You'll get a number that matches the actual number of records with values greater than zero. This becomes the denominator in a new average calculation (instead of the actual number of records that are being summed to create the numberator).

It's easier to do than to describe.

-- tom

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•