calculation formula

J

Jaime

I am trying to create formula that first calculates the difference between to
time fields first and afterwards, I want it to divide by the total of records
by incident:

= Sum ([Beginning Time])-Sum ([Ending Time])
= Count ([Incident])
= Sum ([Beginning Time])-Sum ([Ending Time]) / Count ([Incident])

If I run each one individually the total are correct, but when I combine it
the total are uncoordinated. I know it has to do in part with the field
format but I just cannot make seem to work.
 
T

tina

if the BeginningTime field and the EndingTime field are of Date/Time data
type, then your expression won't work, because the stored values are a
"point in time", not a "number of minutes" (or seconds, or hours). you'll
need to subtract the ending time value from the beginning time value to come
up with elapsed time, then divide by the count of records, as

=Sum(DateDiff("n",[BeginningTime],[EndingTime]))/Count(*)

the above will give you the average number of minutes per record. recommend
you read up on the DateDiff() function so you'll understand how it works.

hth
 
J

Jaime

Tina:

Thank, it work. I read the article and it was a good help. I appreciate the
time you took out to help me.

tina said:
if the BeginningTime field and the EndingTime field are of Date/Time data
type, then your expression won't work, because the stored values are a
"point in time", not a "number of minutes" (or seconds, or hours). you'll
need to subtract the ending time value from the beginning time value to come
up with elapsed time, then divide by the count of records, as

=Sum(DateDiff("n",[BeginningTime],[EndingTime]))/Count(*)

the above will give you the average number of minutes per record. recommend
you read up on the DateDiff() function so you'll understand how it works.

hth


Jaime said:
I am trying to create formula that first calculates the difference between to
time fields first and afterwards, I want it to divide by the total of records
by incident:

= Sum ([Beginning Time])-Sum ([Ending Time])
= Count ([Incident])
= Sum ([Beginning Time])-Sum ([Ending Time]) / Count ([Incident])

If I run each one individually the total are correct, but when I combine it
the total are uncoordinated. I know it has to do in part with the field
format but I just cannot make seem to work.
 
T

tina

you're welcome :)


Jaime said:
Tina:

Thank, it work. I read the article and it was a good help. I appreciate the
time you took out to help me.

tina said:
if the BeginningTime field and the EndingTime field are of Date/Time data
type, then your expression won't work, because the stored values are a
"point in time", not a "number of minutes" (or seconds, or hours). you'll
need to subtract the ending time value from the beginning time value to come
up with elapsed time, then divide by the count of records, as

=Sum(DateDiff("n",[BeginningTime],[EndingTime]))/Count(*)

the above will give you the average number of minutes per record. recommend
you read up on the DateDiff() function so you'll understand how it works.

hth


Jaime said:
I am trying to create formula that first calculates the difference
between
to
time fields first and afterwards, I want it to divide by the total of records
by incident:

= Sum ([Beginning Time])-Sum ([Ending Time])
= Count ([Incident])
= Sum ([Beginning Time])-Sum ([Ending Time]) / Count ([Incident])

If I run each one individually the total are correct, but when I
combine
it
the total are uncoordinated. I know it has to do in part with the field
format but I just cannot make seem to work.
 

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

Top