Count a unique instances of a record

  • Thread starter Thread starter jonefer
  • Start date Start date
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?
 
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
 
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
 
Back
Top