Site LogoIntroduction to SAS: Sum Function


Download the SAS Tutorial in a single PDF file from the SAS Tutorial page. The online tutorial will be eliminated in August 2017.


Contents Index


The Sum function returns the sum of the argument variables which have nonmissing values. Examples:

total=Sum(x, y, z);
total=Sum(of x1-x10);
total=Sum(of x y z);

The first and last example assign total the sum of the variables x, y, and z which have nonmissing values. Note the differences in syntax. The last example returns the sum of the variables among x1, ..., x10 which have nonmissing values.


© Copyright 2016 Jerry Alan Veeh. All rights reserved.