Results 1 to 3 of 3
  1. #1
    dublindan is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    1

    Calculating Grades based on query results

    Hi everyone,

    First post here, so hi all

    I'm creating a database holding the results of audits we are doing. Each audit gets an overall % score, and each individual is given an overall grade based on the average of their audit scores.

    How can I get this grade to calculate?

    Currently my query is:

    SELECT tblHandlers.HandlerName, Avg(tblQualityAudit.TOTAL_SCORE) AS AvgOfTOTAL_SCORE, IIf([TOTAL_SCORE]>=94.1,"4",IIf([TOTAL_SCORE]>=74.1,"3",IIf([TOTAL_SCORE]>=49.1,"2","1"))) AS PBO


    FROM tblQualityAudit INNER JOIN tblHandlers ON tblQualityAudit.Handler = tblHandlers.ID
    GROUP BY tblHandlers.HandlerName, IIf([TOTAL_SCORE]>=94.1,"4",IIf([TOTAL_SCORE]>=74.1,"3",IIf([TOTAL_SCORE]>=49.1,"2","1")));

    It shows a list of the handlers but by individual audit and individual score?

    I genuinely have no idea whether I'm explaining myself well enough, apologies.

    All I need is

    HANDLER - AVERAGE SCORE (over all audits with their name on it) - GRADE (based on that average score)

    >94.1% average = '4'
    >74.1% average = '3'
    >49.1% average = '2'
    All below = '1'

    Please help, I'm totally clueless on whether this can even be done?

    Thanks
    Dan

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    You need a detailed description (plain English) of WHAT you are trying to do --no Access, no jargon.
    Then you need to design your database, based on the business requirements.

    Work through this tutorial to understand the process.
    Good luck.

  3. #3
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,175
    Hi,

    I think the easiest way to handle this is working with 2 queries:
    Query 1 (base query):
    --------------------------
    SELECT tblHandlers.HandlerName, Avg(tblQualityAudit.TOTAL_SCORE) AS AvgOfTOTAL_SCORE
    FROM tblQualityAudit INNER JOIN tblHandlers ON tblQualityAudit.Handler = tblHandlers.ID
    GROUP BY tblHandlers.HandlerName;

    Query 2 (results query):
    ---------------------------
    select Query1.HandlerName, Query1.AvgOfTOTAL_SCORE, IIIf([AvgOfTOTAL_SCORE]>=94.1,"4",IIf([AvgOfTOTAL_SCORE]>=74.1,"3",IIf([AvgOfTOTAL_SCORE]>=49.1,"2","1"))) as PBO

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

Similar Threads

  1. Replies: 2
    Last Post: 02-02-2014, 07:19 PM
  2. Replies: 2
    Last Post: 10-15-2013, 07:50 AM
  3. Calculating from a query based subform
    By keiath in forum Forms
    Replies: 1
    Last Post: 10-09-2013, 02:59 AM
  4. Join Query for Student Grades Database
    By usmcgrunt in forum Queries
    Replies: 2
    Last Post: 04-15-2011, 07:37 PM
  5. Open form based on query results
    By RobbertH in forum Queries
    Replies: 1
    Last Post: 02-10-2010, 08:13 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