Server User Guides > Survey Tabulation > Table specification syntax > Special elements > Restricting a mean using an expression
 
Restricting a mean using an expression
This example uses an expression on the mean element to specify the cases to use in the calculation of the value of the mean for the visits numeric variable. By adding the expression "gender={Male}", you restrict the calculation of the mean to include only those cases where the respondent is male. Apart from the mean element, you can create this type of expression for standard deviation, standard error, sample variance, minimum, and maximum elements. You must include a numeric variable when creating this type of expression, otherwise the expression is ignored and the special element (mean, standard deviation, standard error, or sample variance) is calculated from the assigned factors.
mean(visits, 'gender={Male}')
This example is based on the Museum sample data set.
Here is a table that has this axis on the side:
This graphic is described in the surrounding text.
See also
Special elements