Count but not zeros

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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))
 
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))
 
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
 
Back
Top