I have 30 columns that I need to do this
You have a 'Spreadsheet' instead of a relational database.
First to get your data in the proper structure you need a union query.
A
union query can only be done in SQL view. Create a select query, open
in
design view, click on VIEW - SQL View. The new window has the query in
SQL
(Structured Query Language).
It will look something like this --
SELECT Employee, Q1, Q2, Q3, Q4, .......... Q29, Q30
FROM YourTable;
You will need to edit it to look like this --
SELECT Employee, 1 AS [Question], Q1 AS [Eval]
FROM YourTable
UNION ALL SELECT Employee, 2 AS [Question], Q2 AS [Eval]
FROM YourTable
UNION ALL SELECT Employee, 3 AS [Question], Q3 AS [Eval]
FROM YourTable
UNION ALL SELECT Employee, 4 AS [Question], Q4 AS [Eval]
FROM YourTable
..........
UNION ALL SELECT Employee, 30 AS [Question], Q30 AS [Eval]
FROM YourTable;
When the qryMyUnion is run the data will look like this --
Employee Question Eval
Jim 1 -1
Jim 2 0
Jim 3 -1
Jim 4 -1
Bill 1 -1
Bill 2 -1
Bill 3 0
Bill 4 0
Then you can create a query in design view by clicking on the Greek
symbol
that looks like an 'M' on its side ( ∑ ) and laid out like this --
FIELD Employee % Compliance: (Abs(Sum([Eval]))/Count([Eval])*
100)
TABLE qryMyUnion
TOTAL Group By Expression
--
Build a little, test a little.
:
Very sorry for my ignorance, but where would I put this? Does this go
in
the
report or the query? I have been reading for a few hours on how to do
this
and I'm a little confused right now.
I have 30 columns that I need to do this with and 1200 employees. So,
I'm
hoping once I get one column to work, I should be good to go!
Name Q1 Q2 Q3.... etc.
1200 of them
Thank you SO much...
I'm an AA, not a programmer...
Sue
:
Try this --
SELECT Employee, (Abs(Sum([Eval]))/Count([Eval])* 100) AS [%
Compliance]
FROM YourTable
GROUP BY Employee;
--
Build a little, test a little.
:
We have our data in a table for our evaluation of employees. What
we
need is
group or total the number of Yes and No responses to equal the
perscentage of
times the employee is meeting the standard we have established.
Please
direct me as to where I need to do this so I can have:
Sue Yes
Sue Yes
Sue Yes
Sue Yes
Sue No
Become one line stating:
Sue 80% compliance.
Is this in query or in a report?
Please help... thank you in advance.