SPSS Statistics

 View Only

 Sysmis & Arithmetical operations

Patrick Fisher's profile image
Patrick Fisher posted Thu February 19, 2026 01:47 PM

Good afternoon experts,

I have a series of variables, some of which have data and some are sysmis. I need to get the total of those variables added together in a new variable. The data in these variables is 0,1, or sysmis (the default period).

Compute Wins = (winloss1 + winloss2 + winloss3 + winloss4 + winloss5 + winloss6 + winloss7 + winloss8 + winloss9 + winloss10 + winloss11 + winloss12 + winloss13 + winloss14 + winloss15).

This statement works without errors but returns sysmis values only (the default period).

I have tried a shortened version including only five of the variables. That returns the correct answers as long as there is no sysmis (.) in any variable.

What am I doing wrong?

As logical and analytical as I am, I simply do not understand how to use the sysmis command.

Thank you for your help,

Patrick

Jon Peck's profile image
Jon Peck IBM Champion

The logic of SYSMIS is that it represents unknown or undefined values, so, logically, a sum of variables that includes any sysmis values must be missing.

But the sum function gets around this problem

From the syntax reference ...

SUM(numexpr,numexpr[,..]). Numeric. Returns the sum of its arguments that have valid, nonmissing
values. This function requires two or more arguments, which must be numeric. You can specify a
minimum number of valid arguments for this function to be evaluated.