Calculating percentage in a field

C

CarlaInJax

I have a report that shows results of a customer service survey. One field
is [Survey sent], one field is [survey returned]. The [survey sent]
indicates the date that the survey was mailed and the field [survey returned]
has a number that indicates the level of satisfaction (i.e., 1=very
satisfied; 2=satisfied, etc.). I'm trying to determine the percentages of
each level of satisfaction. I've done a control of (count([survey returned]
iif 1)/(count [survey returned])). It keeps returning an error. What am I
doing wrong?
 
A

Allen Browne

1. Create a query using this table.

2. Depress the Total button on the toolbar.
Access adds a Total row to the grid.

3. Drag the [survey returned] field into the query design grid.
Accept Group By in the Total row.
If you want to NOT count the ones that haven't returned yet, in the Criteria
row, enter:
Is Not Null

4. Drag the [survey sent] field into the grid.
In the Total row under this field, choose Count.

5. In a fresh column in the Field row, enter an expression to get the count
of surveys returned. Something like this:
DCount("[survey returned]", "Table1")
In the total row under this field, choose:
Expression

You now have the data you need to calculate the percentages.
 
C

CarlaInJax

That works great, but how do I get that infi into my report? My report
currently lists all customers that the survey was sent to and the results of
each. My footer totals the surveys sent and it totals the surveys retured.
I'd like to be able to display the percentages in the footer. If that's not
possible, how would I go about putting the percentages somewhere in the
report?

Thanks.

Allen Browne said:
1. Create a query using this table.

2. Depress the Total button on the toolbar.
Access adds a Total row to the grid.

3. Drag the [survey returned] field into the query design grid.
Accept Group By in the Total row.
If you want to NOT count the ones that haven't returned yet, in the Criteria
row, enter:
Is Not Null

4. Drag the [survey sent] field into the grid.
In the Total row under this field, choose Count.

5. In a fresh column in the Field row, enter an expression to get the count
of surveys returned. Something like this:
DCount("[survey returned]", "Table1")
In the total row under this field, choose:
Expression

You now have the data you need to calculate the percentages.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CarlaInJax said:
I have a report that shows results of a customer service survey. One field
is [Survey sent], one field is [survey returned]. The [survey sent]
indicates the date that the survey was mailed and the field [survey
returned]
has a number that indicates the level of satisfaction (i.e., 1=very
satisfied; 2=satisfied, etc.). I'm trying to determine the percentages of
each level of satisfaction. I've done a control of (count([survey
returned]
iif 1)/(count [survey returned])). It keeps returning an error. What am
I
doing wrong?
 
A

Allen Browne

Perhaps you could place a subreport in the Report Footer section.
The subreport would use query you just created as its source.

(Or there might be more efficient ways to get the totals into the report
footer, and calculate the totals there.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CarlaInJax said:
That works great, but how do I get that infi into my report? My report
currently lists all customers that the survey was sent to and the results
of
each. My footer totals the surveys sent and it totals the surveys
retured.
I'd like to be able to display the percentages in the footer. If that's
not
possible, how would I go about putting the percentages somewhere in the
report?

Thanks.

Allen Browne said:
1. Create a query using this table.

2. Depress the Total button on the toolbar.
Access adds a Total row to the grid.

3. Drag the [survey returned] field into the query design grid.
Accept Group By in the Total row.
If you want to NOT count the ones that haven't returned yet, in the
Criteria
row, enter:
Is Not Null

4. Drag the [survey sent] field into the grid.
In the Total row under this field, choose Count.

5. In a fresh column in the Field row, enter an expression to get the
count
of surveys returned. Something like this:
DCount("[survey returned]", "Table1")
In the total row under this field, choose:
Expression

You now have the data you need to calculate the percentages.

CarlaInJax said:
I have a report that shows results of a customer service survey. One
field
is [Survey sent], one field is [survey returned]. The [survey sent]
indicates the date that the survey was mailed and the field [survey
returned]
has a number that indicates the level of satisfaction (i.e., 1=very
satisfied; 2=satisfied, etc.). I'm trying to determine the percentages
of
each level of satisfaction. I've done a control of (count([survey
returned]
iif 1)/(count [survey returned])). It keeps returning an error. What
am
I
doing wrong?
 
C

CarlaInJax

I was able to get the totals in the footer of the report using text boxes to
do the following =Count (*) to count the total number of surveys sent, =count
([survey returned]) to count the number returned. I used =count ([survey
returned])/count (*)) to get the total percentage of surveys returned, but I
cannot get it to calculate the number of surveys returned by response (i.e,
1, 2, 3, etc) as a percentage of the total surveys returned.

Allen Browne said:
Perhaps you could place a subreport in the Report Footer section.
The subreport would use query you just created as its source.

(Or there might be more efficient ways to get the totals into the report
footer, and calculate the totals there.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

CarlaInJax said:
That works great, but how do I get that infi into my report? My report
currently lists all customers that the survey was sent to and the results
of
each. My footer totals the surveys sent and it totals the surveys
retured.
I'd like to be able to display the percentages in the footer. If that's
not
possible, how would I go about putting the percentages somewhere in the
report?

Thanks.

Allen Browne said:
1. Create a query using this table.

2. Depress the Total button on the toolbar.
Access adds a Total row to the grid.

3. Drag the [survey returned] field into the query design grid.
Accept Group By in the Total row.
If you want to NOT count the ones that haven't returned yet, in the
Criteria
row, enter:
Is Not Null

4. Drag the [survey sent] field into the grid.
In the Total row under this field, choose Count.

5. In a fresh column in the Field row, enter an expression to get the
count
of surveys returned. Something like this:
DCount("[survey returned]", "Table1")
In the total row under this field, choose:
Expression

You now have the data you need to calculate the percentages.

I have a report that shows results of a customer service survey. One
field
is [Survey sent], one field is [survey returned]. The [survey sent]
indicates the date that the survey was mailed and the field [survey
returned]
has a number that indicates the level of satisfaction (i.e., 1=very
satisfied; 2=satisfied, etc.). I'm trying to determine the percentages
of
each level of satisfaction. I've done a control of (count([survey
returned]
iif 1)/(count [survey returned])). It keeps returning an error. What
am
I
doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top