Jump to content
Sign in to follow this  
Triple

Calculation to figure out averages.

Recommended Posts

Hi,

I have a db that has about 10 records in it. Each record has a field for "x" but not every record has a value in said field. I can't figure out how to write a calculation that will give me an average of the values that I do have. For example say out of the 10 records 6 have a numeric value in field "x" and the other 4 have yet to be entered. How can I get the average of just those 6 records keeping in mind that the other 4 values will be added at a later date and therefore will be part of the calculation in the future?

Thanks

Share this post


Link to post
Share on other sites

Welcome to the Forum. Look at the Average function. It will not include empty fields in the calculation.

Share this post


Link to post
Share on other sites

Thanks for the welcome.

I had tried that but it didn't seem to work. I created a new calculation field, chose the "Average" function then entered the field that I wanted to average (called Avg. Speed) in the parenthesis. So it ended up looking like this: Average (Avg. Speed). My new field is blank when I go back to the browse screen. Is there something I'm missing?

thanks

Share this post


Link to post
Share on other sites

You need to make a relationship to the other records that are used in the average calculation. Then your cal should look something like Average (Relationship Name::Ave.Speed)

Relationship Name is the name you assign the relationship.

Share this post


Link to post
Share on other sites

If you want to average records in the found set, use a summary field, not a calculation. A summary field defined as Average of FieldX will return the average of non-empty values in FieldX.

I am not sure what your value represents, but keep in mind that most often an average of an average does not produce a meaningful result.

Share this post


Link to post
Share on other sites

Great, changing it to a summary field looks to have done the trick. Thanks for all the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.