Results 1 to 2 of 2
  1. #1
    abinboston is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    1

    Grouping By Week Using a Fixed Start Date

    I have a fixed start date of 06/30/2014


    In a table - I have records that are marked complete on certain dates
    I need a cumulative query by week based on the start date


    the final result will look like below

    Week Ending Completed # Cumulative # % of Total

    7/4/2014 2 2
    7/11/2014 3 5

    The fields I have are named StartDate and Completed

    I created a query to show only completed records - but I do not know how to group by
    the week - using the starting date of 01/30/2014 as the start date



    the initial query to select completed records is below

    SELECT tblPatients.RecordID, tblPatients.Completed, tblPatients.Completed_dt, qryConfig_StartDate.StartDate
    FROM tblPatients, qryConfig_StartDate
    WHERE (((tblPatients.Completed)=True));



    Thanks

    AB

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    1/30/2014 is Wednesday. This will be week 1? Don't want to include Sun, Mon, Tue from December? What are first and last days of your week - Sun and Sat? The records have dates throughout the week?

    Options for calculate week group criteria:

    1. calculate the week ending date for each record

    2. DatePart() function can extract week number: DatePart("ww", [date field])

    Then apply the start date in WHERE criteria.

    The Cumulative is a running sum? Review https://www.accessforums.net/queries...ery-45841.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Start a report on week 40 of a week count
    By aspitalnick in forum Reports
    Replies: 8
    Last Post: 11-28-2012, 04:53 PM
  2. Replies: 3
    Last Post: 04-01-2012, 01:40 PM
  3. Group by Week for any given start date
    By royalrochelle in forum Queries
    Replies: 3
    Last Post: 02-15-2012, 08:44 PM
  4. Replies: 2
    Last Post: 03-05-2011, 05:26 PM
  5. Replies: 9
    Last Post: 01-31-2006, 08:35 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