5 pts.
 Count IIF Statement?
In the design of a query, I noticed that under the tab "Group By", there are only a few types of commands to make calculations. For example, the commands include Sum, Avg, Min, Max, Count, StDev, Var, First, Last, Expression, Where. Is it possible to have a special command? I'd like to use countif(field>0) instead of just counting the number of all the fields.

Software/Hardware used:
Microsoft Access
ASKED: December 21, 2010  6:49 PM
UPDATED: December 23, 2010  8:52 AM

Answer Wiki:
Why not put the criteria of field>0 in your criteria? Then you will only be counting rows where field is > 0 --msi77-- Use the following: <pre>sum(IIf(field>0,1,0))</pre>
Last Wiki Answer Submitted:  December 23, 2010  8:52 am  by  Randym   1,740 pts.
All Answer Wiki Contributors:  Randym   1,740 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _