Getting the average

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I create the average of an en employee given that that there are some
lines that are blank e.g.,

AvgPer% = avg(TotalNoProd/(TaskQ*TrackHrs))

Task TaskQ
A 15
B 30
C -
*Date01/01

Employee Task Trackhrs TotalnoProd Per%
1 A 7 93 88.57%
1 B 2.5 57 76.00%
1 c 2.5 --- ---
--------------------------------------------------------------------------
Total 12 150 82.29%

*Date 01/02

1 A 1
 
JOM said:
How do I create the average of an en employee given that that there
are some lines that are blank e.g.,

AvgPer% = avg(TotalNoProd/(TaskQ*TrackHrs))

Task TaskQ
A 15
B 30
C -
*Date01/01

Employee Task Trackhrs TotalnoProd Per%
1 A 7 93 88.57%
1 B 2.5 57 76.00%
1 c 2.5 ---
---
--------------------------------------------------------------------------
Total 12 150
82.29%

*Date 01/02

1 A 1

Let's start by defining blank Zero, null and space are not the same.
Next what do you want to do with the "blanks?" Do you want the average of
those with data or all of them? Do you want the average of the averages or
the average of the total numbers?
 
Thanks for the reply, I only want to get the average of those that have data
only, and I only want to get the average of the total numbers only...

if anything is blank, leave that out.... the problem comes to when an
employee selects a task enters hours and forgets to put totalNoProd therefore
making the average off...
 
Hi JOM,

What is totalNoProd? Does this represent a result that can be calculated
with other data in the database? If so, then you should not be requiring
anyone to enter such a value, and you should not be storing it. On the other
hand, perhaps it means something like number produced. In that case, it's
fine to store the value.

I would think that the easiest solution is to set the field(s) in your
table(s) as required and/or use validation rules and text at the table level
or at the form level to enforce data entry. That way, your employees won't
be allowed to forget to enter the required values.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

Thanks for the reply, I only want to get the average of those that have data
only, and I only want to get the average of the total numbers only...

if anything is blank, leave that out.... the problem comes to when an
employee selects a task enters hours and forgets to put totalNoProd therefore
making the average off...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top