sluijs
sluijs

Reputation: 4237

SPSS Max function for multiple variables

For a list of three variables I want to store the highest/maximum variable value in a target variable. Reading the Command Syntax Reference I thought the correct function would be COUNT, but it doesn't seem to work. I want a function like MAX(v1, v2, v3) to produce the following results:

v1 v2 v3    target
1  4  2     4
4  1  7     7
2  6  9     9
1  .  15    15
.  .  .     .

What function should I use?

Upvotes: 2

Views: 2980

Answers (1)

JKP
JKP

Reputation: 5417

compute target = max(v1 to v3).

Upvotes: 3

Related Questions