Results 1 to 7 of 7
  1. #1
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50

    Find Avg based on Date Range


    Views: 6 Size: 444.0 KB">QCSTest.accdb


    I am trying to find the average of satisfaction scores based on the date range entered. This would be run as a quarterly report.

    I have created a query, qryQCS, and under the Date field in the criteria I have -
    Between [Start Date (mm/dd/yyyy):] And [End Date (mm/dd/yyyy):]

    Is there a way to run a report based on this query with the selected dates to find the average of the information returned?

    I did find in another thread, "Count days of month with Activity", where it was suggested
    "Make Q1 to pull dates only ,set UNIQUE VALUES = true.

    then make Q2 that uses Q1 to count."

    Unfortunately, I am not sure what the user means or if this would even help. Could someone point me in the right direction please?
    Last edited by mpaulbattle; 11-22-2016 at 08:19 AM. Reason: Trying to add DB copy

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Click on the Totals icon at the top and use that instead. You will group on your main fields, the date range will be "Where" and your scores will be "Avg"

  3. #3
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50
    QCSTest - Copy.zip
    aytee111...I tried the totals but didn't give me what I needed, unless I did it wrong. However, I was able to generate a report and it is mostly what i needed. They have now asked if I am able to count the number of practices who gave us an 8-10, 5-7, or 1-4 within the selected date range. The only thing I have come up with is

    8-10: =Count([Score]>=8)
    5-7: =Count([Score]>=5 And [Score]<8)
    1-4: =Count([Score]>=1 And [Score]<5)

    It is just giving me the total count of all records. I have also tried =DCount("[Score]","qryQCS","[Score] >= 8") but i just get an #Error. Any suggestions?

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    All of this can be done using the Totals button in queries. Not sure why it doesn't work for you.

  5. #5
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50
    The reason it doesn't work for me is because it groups it by the Mnemonic (Practice) so it will average the scores per mnemonic. We just need the avg for all participants.

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Remove the Mnemonic. This is YOUR query - you tell it what to do, not it telling you!

  7. #7
    mpaulbattle is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Aug 2013
    Location
    Houston
    Posts
    50
    I have found what I needed. =Sum(IIf([Score]>=5 And [Score]<8,1,0)). Thanks for your responses aytee111. Your suggestion will come in handy in the future after we get the project in full swing.

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

Similar Threads

  1. Find Match by Date Range
    By soldat452002 in forum Queries
    Replies: 2
    Last Post: 07-31-2016, 03:54 PM
  2. Replies: 4
    Last Post: 04-25-2015, 04:17 PM
  3. Find Min and Max in a selected date range
    By rkalapura in forum Queries
    Replies: 9
    Last Post: 04-01-2013, 09:24 AM
  4. Message Box Based on Date Range
    By MSAccessOldTimer in forum Programming
    Replies: 4
    Last Post: 05-14-2012, 04:25 PM
  5. joins based on date range
    By broecher in forum Database Design
    Replies: 4
    Last Post: 11-04-2011, 06:32 PM

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