Mathematical question

rarejoep

Registered User.
Local time
Today, 22:53
Joined
Oct 8, 2002
Messages
30
I am making a database that contains trainees and courses. It must be able to record the attendance of every day a course is given. I was thinking of a list of courses and dates, and with every combination you can give up which trainees where absent.
This works. Now I want to have the percentage of attendance calculated. I've absolutely no idea how I can do this?? I was thinking of this:
(all the trainees minus the absent ones) divided by all the trainees
 
It depends on how you have stored the information. Ideally you should have 3 tables (for starters)
tblTrainees
tblCourses
tblAttendance (Taking FK from Trainees and Courses)

Do you want to record absences or attendences at this will affect your % calculation. What is your table structure at the minute. I know it may seem picky but it makes it easier to give a calculation if the storage structure is known.
 
I've got a table of Trainees and a table that keeps track of who was absent during a course. Only the absense, because then you automatically know the attendance I think. The information of the courses comes from MS Project, and through a referencenumber I can fill in the absense of a trainee during a certain course.
 
I would be tempted to record the attendences as it is easier to look for something that is there than if it is not. For example you may in the future want an accurate record of the attendence of a particular trainee and which courses they attended. To get the percentage, I have used a custom function to get this as you need to know the total number of possible trainees in each course and the number that actually attended and this is not possible in one query.
 
So it is possible with some kind of function? Can you tell me which one?
 
I see you have started a new thread on this one. Please follow the same thread so that other users can see what information you have been given previously, helpful or not.
I've thought about it again and you may be better off using 2 queries. One just to count the total number of trainees and the second to filter the attendees (Include attendence table and Trainee count query) then divide the number of attendees by the number of trainees and *100 ie in the field box use PercAtt: [tblTrainees].[CountofTraineeID]/[qryTrainees].[CountofTraineeID] *100
Does that make it any easier?
 

Users who are viewing this thread

Back
Top Bottom