Results 1 to 5 of 5
  1. #1
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65

    Help finding unique values to count

    How do I use the count() function to count the number of unique values in a report? The report is based on a query that is already counting and grouping another set of values so I can't group by through that.

    If I have [callsign] values that contain duplicates, I just want to know the total number of unique call signs on the report.

    I tried =Count(iif(Not [callsign]=[callsign],*,IsNull)) but that doesn't seem to be doing it.

    Maybe =Sum( Iif(Not [callsign]=[callsign],1,0) )


    ???

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    Show readers the SQL of the query that is used for your report.

  3. #3
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65
    SELECT DISTINCT qry_all.tsdate, qry_all.type, qry_all.callsign, Count(qry_all.callsign) AS CountOfcallsign, qry_all.clarity
    FROM qry_all
    GROUP BY qry_all.tsdate, qry_all.type, qry_all.callsign, qry_all.clarity
    ORDER BY qry_all.tsdate;

  4. #4
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65
    I'm using it to count the unique call signs of planes that arrive at an airport, and how many transmissions each call sign has, and now I need to count how many of those are clear vs unclear transmissions. I've been trying to do things piece by piece because it's hard to wrap my head around the whole project. I haven't done programming or computer sciency things since college.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using Criteria to Count Unique Values
    By bryan0 in forum Queries
    Replies: 1
    Last Post: 07-21-2014, 12:43 PM
  2. DCount to count unique values
    By nlkehl in forum Queries
    Replies: 3
    Last Post: 06-09-2014, 10:46 AM
  3. Replies: 3
    Last Post: 02-24-2014, 02:19 PM
  4. Count Unique Values in a Category
    By fionny in forum Queries
    Replies: 2
    Last Post: 06-28-2013, 02:28 AM
  5. Count of Unique Values
    By vsmk in forum Queries
    Replies: 2
    Last Post: 03-14-2010, 12:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums