G
Guest
I am using Access 2002. I have a table which is a big list of employees,
listed with their supervisors, and their performance in several different
categories. From there, I created a query that grouped them by supervisor and
category so I could get each supervisor's overall total in each category.
Now, I am running into a problem with my next step. I need to use the
different categories separately as part of an equation for each supervisor.
To further explain, let me give an example:
Say the categories are: Shift, OT, XOT, EQ, Late, NCNS, Unplan
I have summed each category for each supervisor. Problem is, each of the
categories is under a field called "Code." They are not a separate field
themselves. So, here is an example of what I'd now get in the query:
Supervisor Code Total
Meep Shift 4800
Meep OT 2000
Kermit Shift 4800
Kermit OT 500
Kermit XOT 50
Kermit Late 50
Kermit Unplan 480
What I'd need to do now is to use each category separately for the following
equation:
(EQ + Late + NCNS + Unplan)/(Shift + OT) - XOT
So, in the final query, all I want is each supervisor name, and the result
of this equation. Another possible problem is that each supervisor may have
some of those categories missing from their records. In other words, if
supervisor Meep's employees were never late for the time period involved,
late won't show up in her records. So, the equation above would still need to
work even with categories missing. The query would have to either assign 0's
to each missing category, or just know it is null, therefore it would run the
equation even without it.
I know this must sound very confusing, and this may be a pretty tough one.
I'll understand if nobody knows how to help. This one seems really tought to
me. I would GREATLY appreciate any assistance if somebody actually can help.
--
Have a nice day!
~Paul
Express Scripts,
Charting the future of pharmacy
~~~~~~
| |
|c--OD
| _)
| |
|-. |
/ `-# /A
/ /_|..`#.J/
||LJ `m''
ptaylor
listed with their supervisors, and their performance in several different
categories. From there, I created a query that grouped them by supervisor and
category so I could get each supervisor's overall total in each category.
Now, I am running into a problem with my next step. I need to use the
different categories separately as part of an equation for each supervisor.
To further explain, let me give an example:
Say the categories are: Shift, OT, XOT, EQ, Late, NCNS, Unplan
I have summed each category for each supervisor. Problem is, each of the
categories is under a field called "Code." They are not a separate field
themselves. So, here is an example of what I'd now get in the query:
Supervisor Code Total
Meep Shift 4800
Meep OT 2000
Kermit Shift 4800
Kermit OT 500
Kermit XOT 50
Kermit Late 50
Kermit Unplan 480
What I'd need to do now is to use each category separately for the following
equation:
(EQ + Late + NCNS + Unplan)/(Shift + OT) - XOT
So, in the final query, all I want is each supervisor name, and the result
of this equation. Another possible problem is that each supervisor may have
some of those categories missing from their records. In other words, if
supervisor Meep's employees were never late for the time period involved,
late won't show up in her records. So, the equation above would still need to
work even with categories missing. The query would have to either assign 0's
to each missing category, or just know it is null, therefore it would run the
equation even without it.
I know this must sound very confusing, and this may be a pretty tough one.
I'll understand if nobody knows how to help. This one seems really tought to
me. I would GREATLY appreciate any assistance if somebody actually can help.
--
Have a nice day!
~Paul
Express Scripts,
Charting the future of pharmacy
~~~~~~
| |
|c--OD
| _)
| |
|-. |
/ `-# /A
/ /_|..`#.J/
||LJ `m''
ptaylor