Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    83

    Unanswered: Grouping...it's not

    I've got 2 fields in the DB I need to print on a report.

    The data look like this
    CPUS | Speed
    2 500
    2 2300
    4 2300

    I'm grouping based on the speed, so in my group footer I put...
    [Cpus] [Speed] [=Count([Speed])]

    The problem is (as you might have guessed), the 2300's are being grouped together so their count comes out as 2 rather than 1 and 1.

    Is there another way to accomplish this?

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Grouping...it's not

    Originally posted by High_D
    I've got 2 fields in the DB I need to print on a report.

    The data look like this
    CPUS | Speed
    2 500
    2 2300
    4 2300

    I'm grouping based on the speed, so in my group footer I put...
    [Cpus] [Speed] [=Count([Speed])]

    The problem is (as you might have guessed), the 2300's are being grouped together so their count comes out as 2 rather than 1 and 1.

    Is there another way to accomplish this?
    Well actually it is grouping ... What kind of result are you looking for? You might want to also group on the CPUs after the speed grouping ... That would get you the count you're looking for ...

  3. #3
    Join Date
    Mar 2004
    Posts
    83
    I would like the result to be

    1 500 1
    2 2300 1
    4 2300 1

    So theres 1 Pc that has 4 CPUs, 1 that has 2, and so on. Obviously the counts are much larger.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by High_D
    I would like the result to be

    1 500 1
    2 2300 1
    4 2300 1

    So theres 1 Pc that has 4 CPUs, 1 that has 2, and so on. Obviously the counts are much larger.
    Add the secondary grouping on the CPUs then ...

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    You need to group by both speed and cpu_count, not just by speed.

    -PatP

Posting Permissions

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