2 Replies Latest reply on Apr 1, 2007 6:56 PM by scales76

# make a percentage

I am trying to find out how to add together a number of fields and input the answer as a percentage, I am using a Access db, is it best to do it on a seperate action page, on the DB or on the display page. and how?

I have a cell that outputs the avg of a number of results from different columns on the DB, there are a total of 6 cells like this, e.g. questions 1-6 is in the first cell, then on the next row questions 7-11, etc. I have the avg of each question from the Db, (it is a survey that will have upto 16 responses for each question), so I need to display the avg of the avg from questions 1-6 combined as a percentage.

e.g.

5 people answered question 1-5, answers are from 1-5, 1 being low and 5 being high.

person one: 1 ,3,3,4,5
person two: 3,5,1,4,2
person three: 5,4,3,2,1
person four: 2,1,3,5,4
person five: 4,4,2,5,1

avg for question1: 3
avg for question2: 3.4
avg for question3: 2.4
avg for question4: 4
avg for question5: 2.6

avg for questions 1-3 combined as a percentage: 58.6%
avg for questions 4-5 combined as a percentage: 66%

hope that provides enough information any help would be apprieciated, I have tried using a calculator but it does not do what I need.
• ###### 1. Re: make a percentage
You didn't say how you were storing your data. Hopefully your table resembles something like:

PersonId - integer
QuestionID - integer

Your primary key would be PersonID, QuestionId and each of those fields would have foreign key relationships to other tables.

Getting the average then becomes easy.

from yourtable
where questionID = ??

As far as percentages go, you are not being clear. Percentage of what?

Also, rethink this average of the averages concept. That rarely provides anything meaningful.
• ###### 2. Re: make a percentage
Ok firstly, the table is laid out like
AnswerID, ParticipantID, RaterID, SurveyID, Question1, Question2, Question3, Question4, Question5, Question6,...................., Question111, Question112, Question113

All integer

Next: Primary Key is RaterID

Now this is the part I thought I was being clear about,
This is a survey site, So there maybe upto 16 people completing a survey on say the leadership skills of thier boss, 113 questions make up the survey, these questions are fixed, the questions come under sub-headings, so say questions1-6 are for one heading, questions 7-11 are for another heading.