2
votes

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?

1
why do you feel count would return the intended result ? - horace_vr

1 Answers

3
votes

compute target = max(v1 to v3).