Count but not zeros

G

Guest

Help please, I am trying to count the number of items in a [field] on a
report that are not 0. Nothing wants to work I have been studying all the
different methods on the forum but nothing will do it. I have also tried to
not display the zeros but all I get is errors with
=iif([fulldues]=0,null,[fulldues]). I have also tried count([fulldues]>0)
but that won't do and I tried countif but that won't work. What can I be
doing wrong. Thanks
 
F

fredg

Help please, I am trying to count the number of items in a [field] on a
report that are not 0. Nothing wants to work I have been studying all the
different methods on the forum but nothing will do it. I have also tried to
not display the zeros but all I get is errors with
=iif([fulldues]=0,null,[fulldues]). I have also tried count([fulldues]>0)
but that won't do and I tried countif but that won't work. What can I be
doing wrong. Thanks

=Sum(IIf([FieldName] <> 0,1,0))
 
J

John Spencer

In the query, try
Abs(Sum([FullDues]<>0)) as CountDues

In a control on a report in the report footer you could try adding a new
control and settings its source to:
=Abs(Sum([FullDues]<>0))
 
G

Guest

Thank you Fred and John, John's worked I could not get Fred to but them I am
just stumbling along, so simple is best.

John Spencer said:
In the query, try
Abs(Sum([FullDues]<>0)) as CountDues

In a control on a report in the report footer you could try adding a new
control and settings its source to:
=Abs(Sum([FullDues]<>0))


Akrt48 said:
Help please, I am trying to count the number of items in a [field] on a
report that are not 0. Nothing wants to work I have been studying all the
different methods on the forum but nothing will do it. I have also tried
to
not display the zeros but all I get is errors with
=iif([fulldues]=0,null,[fulldues]). I have also tried count([fulldues]>0)
but that won't do and I tried countif but that won't work. What can I be
doing wrong. Thanks
 

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