Percents of totals

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

My report consists of several questions. For each
question I have an option group with Good, Average, Poor,
Unknown. In one unbound control I have the following:
=Sum(IIf([Category]="1",1,0)). This totals up how many
responded Good. The same calculation is written to total
Average, Poor and Unaware. What I now need is to figure
out what percent of the total who answered the question
responded Good, what percent answered Average, etc. I
did create an unbound control which totals the responses
for the question:
=Sum(IIf([Category]="1" Or [Category]="2" Or [category]
="3" Or [category]="4",1,0))
These percentages combined need to total 100%. I hope
this makes sense, and I would really appreciate any help.
 
Chris said:
My report consists of several questions. For each
question I have an option group with Good, Average, Poor,
Unknown. In one unbound control I have the following:
=Sum(IIf([Category]="1",1,0)). This totals up how many
responded Good. The same calculation is written to total
Average, Poor and Unaware. What I now need is to figure
out what percent of the total who answered the question
responded Good, what percent answered Average, etc. I
did create an unbound control which totals the responses
for the question:
=Sum(IIf([Category]="1" Or [Category]="2" Or [category]
="3" Or [category]="4",1,0))
These percentages combined need to total 100%. I hope
this makes sense, and I would really appreciate any help.


That should work, but, unless you have other categories that
you're not counting, you could just use =Count(*).

To get the percent, let's assume that the text box with the
total number of responses is named txtTotResp and each
category total is named txtCatGood, txtCatAvg, etc, then the
percent text boxes would use:
=txtCatGood / txtTotResp
=txtCatAvg / txtTotResp
. . .
 
Thank you Marshall!!! It worked like it should. It was
a dumb mistake on my part. Thanks for the reply. It was
a lifesaver!
-----Original Message-----
Chris said:
My report consists of several questions. For each
question I have an option group with Good, Average, Poor,
Unknown. In one unbound control I have the following:
=Sum(IIf([Category]="1",1,0)). This totals up how many
responded Good. The same calculation is written to total
Average, Poor and Unaware. What I now need is to figure
out what percent of the total who answered the question
responded Good, what percent answered Average, etc. I
did create an unbound control which totals the responses
for the question:
=Sum(IIf([Category]="1" Or [Category]="2" Or [category]
="3" Or [category]="4",1,0))
These percentages combined need to total 100%. I hope
this makes sense, and I would really appreciate any
help.


That should work, but, unless you have other categories that
you're not counting, you could just use =Count(*).

To get the percent, let's assume that the text box with the
total number of responses is named txtTotResp and each
category total is named txtCatGood, txtCatAvg, etc, then the
percent text boxes would use:
=txtCatGood / txtTotResp
=txtCatAvg / txtTotResp
. . .
 
Back
Top