Count a unique instances of a record

J

jonefer

I have a report that is basically a physician directory.
If a physician has 6 offices, the report lists her name
only once (grouping).

I would like to put a total at the bottom of the last page
that reflects a count of that grouping (i.e. only counts
Distinct DocID) and NOT each office.

Example: Total Physicians: 4312

How can I do this?
 
B

Bill Crawford

In your [OfficeLoc] group footer place a calculated field such as:

=Count([DocID])/Count([DocID]) and make it invisible. The field's running
sum property needs to be set to 'Over Group'. Give it an appropriate Name
like DocCount

then in the physician group footer at the end of the report place a
calculated field:

=[Report]![DocCount] (refers to the [DocCount] field, you made above,
in the open report)

I use this method to count the number of tree sample plots, since the plot
numbers are replicated in the source table as many times as there are unique
species. I don't want to count the replicatations, just the unique plot
numbers :)

hope it helps
 
D

Duane Hookom

Add a text box to the Physican group header:
Name: txtCountDoc
Control Source:=1
Running Sum: Over All
Then add a text box to the Report Footer with a control source of
Control Source: =txtCountDoc
 

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