PC Review


Reply
Thread Tools Rate Thread

Counting Unique Values within a Group

 
 
Scott Albright
Guest
Posts: n/a
 
      10th Mar 2010
I have a report that lists students by grade and the amount of money donated
by that student's family. If the parents are divorced, the student's name is
listed twice, once for each parent. I want to count only the unique student
record in each grade. DCount is giving me the count for the whole school
regardless of what group detail i put it in. How do I count only the unique
records within each grouping?

Thanks in advance.
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      10th Mar 2010
I would attempt to create a totals query that groups by whatever and counts
something. Add this totals query to your report's record source and join on
the whatever so the counts something is then available in the report.


"Scott Albright" <(E-Mail Removed)> wrote in message
news:59367CC6-151B-43D4-92AF-(E-Mail Removed)...
> I have a report that lists students by grade and the amount of money
> donated
> by that student's family. If the parents are divorced, the student's name
> is
> listed twice, once for each parent. I want to count only the unique
> student
> record in each grade. DCount is giving me the count for the whole school
> regardless of what group detail i put it in. How do I count only the
> unique
> records within each grouping?
>
> Thanks in advance.


 
Reply With Quote
 
John Spencer
Guest
Posts: n/a
 
      10th Mar 2010
This gets asked reasonably often, so here is a new article:
ECount() - an extended DCount()
at:
http://allenbrowne.com/ser-66.html

ECount() takes the same arguments as DCount(), but an extra flag you can set
to retrieve the distinct count.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Scott Albright wrote:
> I have a report that lists students by grade and the amount of money donated
> by that student's family. If the parents are divorced, the student's name is
> listed twice, once for each parent. I want to count only the unique student
> record in each grade. DCount is giving me the count for the whole school
> regardless of what group detail i put it in. How do I count only the unique
> records within each grouping?
>
> Thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting Unique Values Paul Ferro Microsoft Excel Misc 1 11th Apr 2007 06:12 AM
Re: Unique Counting -- use Group By strive4peace Microsoft Access Queries 0 23rd Jan 2007 02:33 PM
Counting unique values giantwolf Microsoft Excel Misc 4 28th Aug 2006 01:31 PM
Counting unique values and all values in same query John Morrissey Microsoft Access Queries 1 6th Aug 2004 12:14 PM
Counting Unique Values NoviceUser Microsoft Access Reports 1 5th Mar 2004 10:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:17 PM.