Results 1 to 3 of 3
  1. #1
    mabuhay87 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    8

    Rolling Average previous 12 months then 1 month rolling average

    I have a query with EmployeeID, PayDate, HoursPerPeriod.

    Example:

    EmployeeId PayDate HoursPerPeriod RollingAverage

    -----1-----------10/8/2012-------35.28
    -----1-----------10/22/2012-----42.96
    -----1-----------11/4/2012--------41.92
    -----1-----------11/18/2012--------32.66
    -----1-----------12/16/2012--------35.65
    -----1-----------12/30/2012--------36.0
    -----1-----------1/14/2013--------43.5
    -----1-----------1/28/2013--------32.66
    -----1-----------2/11/2013--------39.84
    -----1-----------2/25/2013--------31.03
    -----1-----------3/11/2013--------38.08
    -----1-----------3/25/2013--------35.12
    -----1-----------4/8/2013---------38.84
    -----1-----------4/22/2013--------37.79
    -----1-----------5/6/2013---------39.44
    -----1-----------5/20/2013--------38.04
    -----1-----------6/3/2013---------37.48


    -----1-----------6/17/2013--------48.56
    -----1-----------7/1/2013--------39.44
    -----1-----------7/15/2013--------36.71
    -----1-----------7/29/2013--------34.62
    -----1-----------8/12/2013--------36.19
    -----1-----------8/26/2013--------35.12
    -----1-----------9/9/2013----------31.68
    -----1-----------9/23/2013---------34.42
    -----1-----------10/7/2013--------36.93------------38.0
    -----1-----------10/21/2013-------38.06------------37.0
    -----1-----------11/4/2013--------34.23------------36.0

    ----so on and so forth with different EmployeeID.

    1) How to get the 12 month rolling average from 10/8/2012 to 9/23/2013
    and results will be shown on 10/7/2013 under Rolling Average field?

    2) How to get the rolling average by paydate after 10/7/2013?

    This is the rolling average based on employeeID.

    Please help.

    Thank you.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Are you wanting a hard coded solution, or a variable? I generally use a calendar to set my dates. Are you ONLY using PayDate as your date criteria? Are you wanting to query by period, define what a period is if so. Please explain a little more.
    Between [Forms]![frmYourFormNameHere]![StartDate] And [Forms]![frmYourFormNameHere]![EndDate]

  3. #3
    mabuhay87 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    8
    I tried to create a query of all employees' hours per period(every two weeks PayDate). I used PayDate as date criteria. What I am trying to accomplish is to get the calculations of rolling average hours per PayDate from previous 12 months(10/1/2012 to 9/30/2013) starting on 10/1/2013 then calculations of rolling average continue the next PayDate.


    Please help and guide me.

    Thank you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 43
    Last Post: 08-06-2014, 08:21 PM
  2. rolling 12 month report
    By tngirl in forum Reports
    Replies: 7
    Last Post: 03-13-2014, 01:50 PM
  3. Rolling Months within a Report
    By RayMilhon in forum Reports
    Replies: 5
    Last Post: 06-14-2013, 03:28 PM
  4. Rolling 12 or 6 Month Query
    By Shakenaw in forum Access
    Replies: 2
    Last Post: 09-22-2011, 09:24 AM
  5. Rolling 3 Month sums
    By michaeljohnh in forum Reports
    Replies: 1
    Last Post: 11-08-2010, 05:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums