• DCount in a Report

    Author
    Topic
    #469359

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #1226954

      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
      • #1226957

        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.

        • #1226961

          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))

          • #1226965

            You did not mention that before.

            Sorry about that.

            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?

    • #1226967

      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.

    Viewing 1 reply thread
    Reply To: DCount in a Report

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: