Desktop User Guides > Professional > Table scripting > Table specification syntax > Special elements > Displaying the sum of a numeric variable
 
Displaying the sum of a numeric variable
Sample Script File: SpecialElements.mrs
This example script is based on the Museum sample data set. See Running the sample table scripts for information on running the example scripts.
This example is based on the Museum sample data set.
age{.., sumvisits 'Total visits by respondents' sum(visits)}
This creates an axis based on all of the elements in the age variable with the addition of a special element that shows the sum of the values in the visits variable. This variable stores the number of previous visits that respondents have made to the museum. Therefore this element shows the total number of previous visits that male and female respondents have made to the museum. A custom label overrides the default.
Here is a table that has this axis on the side:
This graphic is described in the surrounding text.
See also
Special elements