Alpha Video Training
Results 1 to 3 of 3

Thread: Count Distinct in a report

  1. #1
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,820

    Default Count Distinct in a report

    I want to count the number of distinct values for a field and put that number into a group total of a report.

    But I do not see that option in Alpha.

    There is a way to count duplicates, but I really want the opposite of that.

    What am I missing?

  2. #2
    Member mariusm's Avatar
    Real Name
    Marius M.
    Join Date
    Sep 2006
    Location
    Plymouth, UK
    Posts
    199

    Default Re: Count Distinct in a report

    If you're looking for a SQL query statement, then "SELECT COUNT( DISTINCT field ) FROM table "

    This will only work on SQL tables, not Access. For Access databases, it's SELECT COUNT(*) AS someName FROM (SELECT DISTINCT field FROM table)
    Last edited by mariusm; 11-12-2019 at 11:58 AM. Reason: Code for Access tables
    It is easier to get older than wiser

  3. #3
    "Certified" Alphaholic
    Real Name
    Larry Grupido
    Join Date
    May 2010
    Posts
    1,820

    Default Re: Count Distinct in a report

    I know how to do it in sql but I'm listing out all the records in the report. I have totals at the bottom for other numbers that are working just fine as calculated fields or summary fields. I don't want to add a sql count into the mix if I can do it as a summary calculation.

Similar Threads

  1. DISTINCT not being honoured in list
    By Lance Gurd in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 09-30-2015, 03:46 AM
  2. Override search using DISTINCT
    By Peter.Greulich in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 09-13-2012, 06:34 PM
  3. Distinct Count
    By ehanson in forum Alpha Five Version 10 - Desktop Applications
    Replies: 5
    Last Post: 06-13-2011, 02:43 PM
  4. Distinct Count
    By George Bustos in forum Alpha Five Version 4
    Replies: 2
    Last Post: 01-15-2004, 08:41 AM
  5. Distinct
    By Ken Davis in forum Alpha Five Version 5
    Replies: 5
    Last Post: 10-25-2002, 07:49 AM

Bookmarks

Posting Permissions

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