Omit Zeros When Summing a Column In Reports

Learn2010

Registered User.
Local time
Today, 15:23
Joined
Sep 15, 2010
Messages
415
I have a report based on a table. In the report I sum the columns. In a textbox ControlSource I use "=Sum([ColumnTotal])" and it works. Some of these numbers are zeros. I would like to exclude the zeros in the total. How do I do that?

Thank you.
 
I'm confused, as zero values wouldn't affect the sum anyway.
 
What I meant was I need to count the items in the column that are greater than zero.
 
=Sum(IIf(FieldName > 0, 1, 0))

The field name instead of 1 if you want to sum rather than count.
 
You helped me figure it out. I used

=Count(IIf([FieldName]>0,1))

and got the correct count.

Thanks.
 
No problem. What I posted should have returned the same result.
 

Users who are viewing this thread

Back
Top Bottom