Group total and average for a duration report?

R

Rick B

Okay, I have a report that includes daily work start and stop times and
daily lunch start and stop times. On each line I also include a work
duration and a lunch duration.

My lunch duration is an unbound text box named Text14 and it has the
following formula in it:
=(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format((DateDiff("n",[StartLunch],[EndLunch])) Mod 60,"\:00")

This prints the lunch duration in the format 00:00, so an hour and a half
would show 1:30.



My total duration is Text16 and contains the following formula:
=(DateDiff("n",[StartWork],[EndWork])-DateDiff("n",[StartLunch],[EndLunch]))
\60 &
Format((DateDiff("n",[StartWork],[EndWork])-DateDiff("n",[StartLunch],[EndLu
nch])) Mod 60,"\:00")



I have a group that pulls the weeknumber out of the date, so each week can
include a total and a daily average.
The grouping is based on: =Format([workdate],"ww")


I have tried several things and can't figure out how to get the following
totals and averages built in my group footer.

Average Lunch Duration
Average Work Duration
Total Work Duration for the week.

I have tried various versions of pasting the formulas above into a text box
in my group footer and using the Running Sum field. I have also tried
putting a text box in my group footer and making the data source = Text14 or
Text16 and working with the running sum field.

In some cases I get the figure from the last record in the group. In other
cases, I get a total, but it does not equal the total of the five records in
the group.

I would (of course) like to apply similar format as I have above so the
total and average will show as HH:MM.

Thanks for your help!!
 
R

Rick B

Okay, I added a "LunchDuration" field and a "TotalDuration" field to my
query.

I am able to use this to calculate a group total. I can also use my format
to display it as desired.

What I can't firure out is the average. Please let me know how to do that.

THANKS FOR YOUR HELP IN ADVANCE!
 
R

Rick B

Nevermind:

I figured it out. Guess I underestimated my totalling and averaging skills.
 
M

Marshall Barton

Rick said:
Nevermind:

I figured it out. Guess I underestimated my totalling and averaging skills.


Gee, Rick, are all your conversations with yourself so
productive? All that and it only took 17 minutes ;-)
 

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