Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Kitchener, Ontario, Canada
    Posts
    228
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a report which I have grouped. In the details is a cell "QoSBoxes" in the footer of the group I am trying to build a box to count the number of times the "QoSBoxes" has the entry "TopBox" in it. I have attached the report for you to look at. I know this is simple but I am missing something.
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    When I put in the expression I gave you last time

    Code:
    =DCount("*","AgentReportCardCSAT","[QoSBoxes]='TopBox'")
    I think I get the right answer.

    Am I missing something?

    There are three parts of a Dcount:
    • What to count? * if you just want to count records
    • Where to do it - a table or a query name
    • Optionally - a condition. What records to count
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Kitchener, Ontario, Canada
    Posts
    228
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by John Hutchison View Post
    When I put in the expression I gave you last time

    Code:
    =DCount("*","AgentReportCardCSAT","[QoSBoxes]='TopBox'")
    I think I get the right answer.

    Am I missing something?
    I tried that but the it is only giving me the overall total in the query. I am trying to get it to count based on the groupings of the report.

    I also Tried

    =DCount("[QoSBoxes]","AgentReportCardIssueCodingBreakdown","[QoSBoxes]='TopBox'")

    where

    What to count? the QosBoxes control on the report
    Where to do it? on the AgentReportCardIssueCodingBreakdown report; I think this is where I am going wrong
    What records to count? [QoSBoxes]='TopBox'"; this should be counting based on the grouping of the report.

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Quote Originally Posted by cslauenwhite View Post
    I tried that but the it is only giving me the overall total in the query. I am trying to get it to count based on the groupings of the report.
    You did not mention that before.

    You put the figure in the Issue Code 4 Footer. So the count needs to be restricted to those with the right IssueCode1, IssueCode2, IssueCode3 and Issuecode4. And it is further complicated by the fact that lots of records don't have an IssueCode4.

    Given all that, It is probably easier to use a slightly different approach, as shown in this Post

    =sum(IIF([QoSBoxes]="TopBox",1,0))
    Regards
    John



  5. #5
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Kitchener, Ontario, Canada
    Posts
    228
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by John Hutchison View Post
    You did not mention that before.
    Sorry about that.

    Quote Originally Posted by John Hutchison View Post
    You put the figure in the Issue Code 4 Footer. So the count needs to be restricted to those with the right IssueCode1, IssueCode2, IssueCode3 and Issuecode4. And it is further complicated by the fact that lots of records don't have an IssueCode4.

    Given all that, It is probably easier to use a slightly different approach, as shown in this Post

    =sum(IIF([QoSBoxes]="TopBox",1,0))
    You are the man... worked like a charm.

    but what is the differance between DCount and and sum(IIF

    dont they sort of do the same thing?

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Yes they do sort of the same thing, but

    Dcount goes back to the actual source query, so you need to specify all the conditions you want to place on the count.

    The Sum expression works within the report itself. Because it is in the IssueLevel4 footer, it only sums across the records within that Group. So you don't need to add in all the extra conditions.
    Regards
    John



Posting Permissions

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