Count # of occurrences in a field

  • Thread starter Thread starter iloveddp
  • Start date Start date
I

iloveddp

Guest
I am trying to do a report that will count how many times there is a value greater than 0 in my field called "rej qty". I have tried: count([rej qty]>0,1,0) and many other variations. I am selecting a date range on the report and it will count the whole entire database for that field. I only want the items within a date range counted. I am pulling my hair out, I will be done with it as soon as I can get this last calculation done. Can anyone help me with this? Thanks, oh I have worked with the IIF command also, but with no luck.
 
I believe that COUNT is a simply function that does not permit criteria. Try using DCOUNT instead. There are good instructions and examples in Help.
 
if you base your report on a query you could set up a calculated field that would do this:

RejCount:iif([RejQty] > 0,1,0)

you would then add RejCount to your report and sum that column to get the total.

Denny
 
The last post to my problem solved it....thank you Denny, it worked!

Tina
 
What if the field on is an Expresiion?!!
DaniBoy
 

Users who are viewing this thread

Back
Top Bottom