Report with percentages of total

X

xp

I'm trying to write a report which will yield something like the following:

John 1 25%
Mary 2 50%
George 1 25%
Total 4

I am having trouble getting the percentages. I put a text box in the report
DETAIL area and entered the formula:

=DCount("USER_NM", "tblStats")/DCount("*","tblStats")

But this fails...any ideas?

Thanks!
 
M

Marshall Barton

xp said:
I'm trying to write a report which will yield something like the following:

John 1 25%
Mary 2 50%
George 1 25%
Total 4

I am having trouble getting the percentages. I put a text box in the report
DETAIL area and entered the formula:

=DCount("USER_NM", "tblStats")/DCount("*","tblStats")


We need to know what the report's input looks like before
explaining how to get that output. Please provide a small
sample of the data records the report is processing.
 
D

Duane Hookom

A WAG is a control source like:
=USER_NM/Sum(USER_NM)
This assumes you want the percent of the USER_NUM compared to the total
USER_NM displayed in the report.

DCount() is generally a poor function to use in this situation.
 

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