Count? Yes

P

Pam Hatfield

It seems like every new thing I do I have to ask you for help so here it
goes:

How do I count the number of records returned that are formatted "Yes/No"

=Count([Sold At Sale])

Returns all of the records and not just the "Yes" records.

Thanks.
 
B

Bruce M. Thompson

It seems like every new thing I do I have to ask you for help so here it

This is how one learns through the experience of others. said:
How do I count the number of records returned that are formatted "Yes/No"

=Count([Sold At Sale])

Returns all of the records and not just the "Yes" records.

Try:

=Abs(Sum([Sold At Sale]))

Because a "Yes" value is represented by the value -1, you can simply add up the
values (5 * -1 = -5) and then find the "absolute value" of the result: Abs(-5) =
5

:)
 
A

Al Campagna

Pam,
Yes returns a -1 and No returns 0, so...
You should be able to use...
Sum([SoldAtSale])*-1 ' to get a positive value
would count all the "Yes" records.
 
P

Pam Hatfield

Bruce,

Thank you. This is why I do this to make my life easier and not as a living!

This worked for the individual sale dates so how do I total this number?

Thanks.

Pam
It seems like every new thing I do I have to ask you for help so here it
goes:

This is how one learns through the experience of others. <smile>


How do I count the number of records returned that are formatted "Yes/No"

=Count([Sold At Sale])

Returns all of the records and not just the "Yes" records.

Try:

=Abs(Sum([Sold At Sale]))

Because a "Yes" value is represented by the value -1, you can simply add up the
values (5 * -1 = -5) and then find the "absolute value" of the result: Abs(-5) =
5

:)
 
B

Bruce M. Thompson

This worked for the individual sale dates so how do I total this number?

Is your report grouped by "Sales Date" and is the calculated control located in the "Sales Date" footer? If this is the case, you would need to place a textbox with the same "control source" in the report footer to get the overall total. If this is not the case, you will need to provide more information, such as why you are getting the count for the individual sale dates.
 
P

Pam Hatfield

Yes, there is a Sales Date Footer. If I copy the textbox, it comes up
with the total of 1 which is not correcr.

Pam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top