Count? Yes

  • Thread starter Thread starter Pam Hatfield
  • Start date Start date
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.
 
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

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

:-)
 
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.
 
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
 
Yes, there is a Sales Date Footer. If I copy the textbox, it comes up with the total of 1 which is not correcr.


From where are you copying the textbox and to where are you pasting it? If you are copying the calculated control from a *group footer* and pasting it to the *report footer*, the sum returned will be at least the value returned in the group footer. Make sure you are not placing your calculated control in a *page footer*.
 

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

Similar Threads


Back
Top