Count Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am trying to build a form. In the group footer I am running summary
totals.
This column called Response has two choices Unreconciled or Reconciled. In
my report I want to count the number of responses, unreconciled responses and
reconciled responses.

How do I write the expression to count the Unreconciled and reconciled
responses. For example if there is a 180 responses. =Count([Response]),
this function counts the total responses. How do I write the expression to
count the two choices?
 
Lee said:
Hello,

I am trying to build a form. In the group footer I am running summary
totals.
This column called Response has two choices Unreconciled or
Reconciled. In my report I want to count the number of responses,
unreconciled responses and reconciled responses.

How do I write the expression to count the Unreconciled and reconciled
responses. For example if there is a 180 responses.
=Count([Response]), this function counts the total responses. How do
I write the expression to count the two choices?

All responses: =Count([Response])

Reconciled: =Abs(Sum([Response]="Reconciled"))

Unreconciled: =Abs(Sum([Response]="Unreconciled"))

The last two expressions take advantage of the fact that the logical
value True evaluates as -1, so we sum add up the result of the logical
expression, than take the absolute value of that to remove the minus
sign.
 
Is Reconciled and Unreconciled a "value" of the field Resonse?

You would need two queries.
One would be:
SELECT <blah, blah, blah> WHERE Response="Reconciled"
SELECT <blah, blah, blah> WHERE Response="Unreconciled"

If there is only two possible values, then you could simply test for one to
get a count and then subtract that from the total number of records and that
would be the amount of the other option

SELECT <blah, blah, blah>
(returns 180)
SELECT <blah, blah, blah> WHERE Response="Reconciled"
(returns 74 hits)
180 total responses - 74 Reconciled = 106 Unreconciled

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com
-----------------------------------------------------
Understanding the ISA 2004 Access Rule Processing
http://www.isaserver.org/articles/ISA2004_AccessRules.html

Microsoft Internet Security & Acceleration Server: Guidance
http://www.microsoft.com/isaserver/techinfo/Guidance/2004.asp
http://www.microsoft.com/isaserver/techinfo/Guidance/2000.asp

Microsoft Internet Security & Acceleration Server: Partners
http://www.microsoft.com/isaserver/partners/default.asp

Deployment Guidelines for ISA Server 2004 Enterprise Edition
http://www.microsoft.com/technet/prodtechnol/isa/2004/deploy/dgisaserver.mspx
 
Back
Top