Results 1 to 5 of 5
  1. #1
    jeepjenn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Location
    Ottawa, Canada
    Posts
    19

    How to figure out percentage of attendance

    Hi Everyone,

    I am using the "students" database template that comes with Access 2013, and I'm trying to figure out how to do something with the "Student Attendance Count" Query:

    1. I want to calculate a percentage of attendance (and I cant figure out the expression builder)

    I'm sorry, this is probably really simple for everyone who has a lot of experience with Access...I've watched a bunch of videos and did a lot of reading today, but I haven't found anything that made sense to me.

    Jennifer

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    This is easiest done on a report using Sorting & Grouping features with aggregate calcs in group and report footer sections.

    Otherwise, need to do several queries and join the queries. Or nested subquery. So do aggregate query to get the total attendance, grouped as appropriate - maybe by account number or yrmo or whatever you are trying to get percentage of. Then join that query to other dataset, maybe an aggregate grouped by student and account number. This will put the total for each account next to each student/account total and now you can do a calculated field for the percentage.
    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.

  3. #3
    jeepjenn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Location
    Ottawa, Canada
    Posts
    19
    Quote Originally Posted by June7 View Post
    This is easiest done on a report using Sorting & Grouping features with aggregate calcs in group and report footer sections.

    Otherwise, need to do several queries and join the queries. Or nested subquery. So do aggregate query to get the total attendance, grouped as appropriate - maybe by account number or yrmo or whatever you are trying to get percentage of. Then join that query to other dataset, maybe an aggregate grouped by student and account number. This will put the total for each account next to each student/account total and now you can do a calculated field for the percentage.


    Ok, so I have done it through a report which gives me the information I need to calculate the percentage (the sum of number of days, and the count of the days "Present")....I'm much more familiar with excel and formulas, but these don't really look the same at all.

    (Photo Included Below)


    Status has three options - "Present", "Absent Excused" and "Absent Unexcused"

    I know I want to do this: =([Status = "Present"])/([Number of days]) but I don't think I'm writing it correctly.


    Also, will the correct formula eliminate the "enter parameter value" box that comes up when I run the report?

    Thank You for your help so far.

    Jennifer

    Click image for larger version. 

Name:	access.jpg 
Views:	16 
Size:	238.2 KB 
ID:	23398

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    =Sum(IIf([Status]="Present", [Number of Days], 0)) / Sum([Number Of Days])
    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.

  5. #5
    jeepjenn is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Location
    Ottawa, Canada
    Posts
    19
    Quote Originally Posted by June7 View Post
    =Sum(IIf([Status]="Present", [Number of Days], 0)) / Sum([Number Of Days])
    That worked!!!

    Thank You SOOOO much June7!!!

    I really appreciate your kindness!!!

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

Similar Threads

  1. Need Help Counting Attendance
    By jcharbula in forum Queries
    Replies: 3
    Last Post: 07-07-2014, 12:28 PM
  2. Replies: 6
    Last Post: 01-16-2014, 12:41 PM
  3. Replies: 5
    Last Post: 03-21-2012, 07:13 AM
  4. Automate Attendance
    By Palomino33 in forum Access
    Replies: 3
    Last Post: 01-14-2012, 03:57 PM
  5. Attendance Database
    By grankioto in forum Access
    Replies: 2
    Last Post: 02-05-2011, 02:48 PM

Tags for this Thread

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