Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query-Percentage of Responses 1

Status
Not open for further replies.

Crogirl

Technical User
Aug 27, 2002
18
US
It's been awhile since I've worked with Access, and I'm totally blanking on how to create this query. I created a db to track our exit interview responses. There are several questions where employees are asked to rate their experiences on a scale of 1-4. How can I write a query to determine what percentage of responses were a 4? The purpose is to determine what percentage of employees think we are doing exceptionally well in what areas. ANy help would be greatly appreciated!
 
Let me take this one step further. Perhaps I am going about this all wrong...
First, I pulled all of my fields from my table into a query and listed "like 4" in the criteria. I was able to extract all of the responses that selected "4", but now how do I create that into a percentage of total responses?
 
Depends on how your tables are set up. If it's a normalized database, you could just count all responses, count each individual response and divide.

What are your tables and fields? That will help alot in getting a helpful response.

Leslie
 
Leslie,

The table that I am dealing with is my main table. I have several other tables that I used as foreign keys in the main table, so there are a lot of integral relationships set up.
Basically, the table looks something like this:
exitinterviewID(primary key)
AgeID(foreignkey)
GenderID(foreignkey)
RateCooperationInDepartment
RateAvailableEquipment
RateBenefits

The last three are examples of the lists of questions in my main table. I would need to count the total number of those responses and then extract, out of those, which ones were rated a 4. I hope this clarifies!
Thanks again for your help!
 
So try this:

SELECT COUNT(RateCooperationInDepartment) As RCIDTotal, Count(iif(RateCooperationInDepartment = 4, 1, 0) RCIDFours,
Count(RateAvailableEquipment) AS RAETotal, Count(iif(RateAvailableEquipment = 4, 1, 0) As RAEFours, Count(RateBenefits) as RBTotal, count(iif(RateBenefits = 4, 1, 0) as RBFours FROM TABLENAME

Save this query as RatingTotals (or something) Then run a second query with RatingTotals as the source to get the percentages (you may be able to do this in one query, but I don't know)

SELECT RCIDFours, RCIDTotal, (RCIDFours/RCIDTotals) * 100 As CooperationPercent, RAEFours, RAETotal, (RAEFours/RCIDTotal) * 100 As AvailableEquipPercent, RBFours, RBTotal, (RBFours/RBTotal) * 100 As BenefitPercent
FROM RatingTotals

I'm not sure about formatting it as a "Percent" with the % sign, but I bet it can be done!

HTH

Leslie

 
Thank you so much for your help. That worked perfectly!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top