Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   Monthly average Query/or report (https://www.askmehelpdesk.com/showthread.php?t=368595)

  • Jun 24, 2009, 12:51 PM
    ashley velez
    2 Attachment(s)
    Monthly average Query/or report
    At my work we have a "sign in sheet" table...
    I have created a query that calculates daily time, but when I try to create a report that shows weekly average hours, It gives me the daily average for each week, I assume I need to change the "DailyTime" column in my report to calculate weekly time, but I don't know how to do that.

    Can anyone help me?

    I have attached screen shots of the query, and the table that the query comes from...

    The daily time code I am using in my query is
    Daily Time: Round(IIf(IsNull([Time Out Lunch]),DateDiff("n",[Time In AM],[Time Out PM]),DateDiff("n",[Time In AM],[Time Out Lunch])+DateDiff("n",[Time In Lunch],[Time Out PM]))/60,2)
  • Jun 24, 2009, 01:14 PM
    ScottGem

    Ok, this is what I was getting out in my other post. To do what you want is fairly easy. What you need to do is first add a column to your query:

    WeekTot: Datepart("ww",[Datefield])

    Then make your query a Group By query and gropup on the WeekTot column first. Then sum the time.

    Do the same only grouping by month.
  • Jun 25, 2009, 01:33 PM
    ashley velez
    Do I literally write date filed, or do I put a date filed in those brackets how do I only group on the weektot column, and get a sum.. I am sorry I am just confused

  • All times are GMT -7. The time now is 08:00 PM.