In the Formula dialog you can define which cases to include in the formula, which calculation method to use and also whether to include or exclude zero values and missing values.
Formula dialog
Help URL: http://www.yourdomain.com/help/index.html?case_for.htm