Count unique records

  • Thread starter Thread starter PizzaBoy
  • Start date Start date
P

PizzaBoy

Does anybody know how to count the number of unique records by another field
in a report?
Sample Data:
BLD 1 UNIT 101
BLD 1 UNIT 101
BLD 1 UNIT 202
BLD 1 UNIT 202
BLD 1 UNIT 202
BLD 2 UNIT 303
BLD 2 UNIT 303
BLD 2 UNIT 303
Would like the following output:
BLD1 2
BLD2 1

The count would show the number of unique records per building. I currently
have a report which groups buildings and their associated average rate. I
would like the report to show the number of unique units within each
building.

Thanks in advance.

Unit 1 count=
 
Have you considered doing the "count" work in a query, before you ever get
to a report?
 
Thanks for the suggestions. The report is currently built on a query-how
could I incorporate the count to accomplish this?

Thanks
 
A report, like a form, can hold more than one query's results (main form,
sub form; main report, sub report), or can use an unbound control that uses
one of the database functions (DCount()) as a source.
 
Back
Top