Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Count Unique (Access97)

    How do I count unique dates in a query? When I use Total: Group By, my query results sort in date order. But i'd like to count the dates of activity. When I use Group By, one account results in 4 dates of activity. But Count results in counting ALL the results of activity. In one case 4 days/dates of activity results in 123 transactions.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Count Unique (Access97)

    It's not clear to me whether you want to count the number of unique dates, or the number of unique dates per activity. Anyway, do it in two steps. First create a query that only returns the date, or activity and date, depending on what you want. Make it into a Totals query, with Group by on the field or fields. Save this query.
    Create a new query based on the first one. Add the field or fields. Make this into a Totals query too. Set the Totals option for the Date field to Count; if you also have Activity, leave it as Group By. This query should count the number of unique days.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Count Unique (Access97)

    Thanks Hans . . . that works perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •