Distinct Count

V

Victoria

In the grouping option there is a count option, but not a distinct count
option. How can I get a distinct count of something, short of a series of
queries?
 
L

Lisa

Have you tried making a Report with a text box that reads --

=Count([Change Request #])

or whatever it is you're trying to count??
Lisa
 
V

Victoria

That would just provide a count, not a distinct count. The issue is that I
want a distinct count of the number of days, however there are multiple
duplicates. Rather than grouping in one query, then counting in another, I'd
like to know if there is a formula or vb statement that I can use for
counting of distinct records.

Lisa said:
Have you tried making a Report with a text box that reads --

=Count([Change Request #])

or whatever it is you're trying to count??
Lisa

Victoria said:
In the grouping option there is a count option, but not a distinct count
option. How can I get a distinct count of something, short of a series of
queries?
 
J

John Spencer (MVP)

Access does not support Distinct Count.

You have to use a subquery or nested queries.

SELECT Count(SELECT DISTINCT SomeField FROM SomeTable WHERE ...) as CountField
FROM YourTable
....
That would just provide a count, not a distinct count. The issue is that I
want a distinct count of the number of days, however there are multiple
duplicates. Rather than grouping in one query, then counting in another, I'd
like to know if there is a formula or vb statement that I can use for
counting of distinct records.

Lisa said:
Have you tried making a Report with a text box that reads --

=Count([Change Request #])

or whatever it is you're trying to count??
Lisa

Victoria said:
In the grouping option there is a count option, but not a distinct count
option. How can I get a distinct count of something, short of a series of
queries?
 
Top