79098246

Date: 2024-10-17 13:17:04
Score: 2
Natty:
Report link

This can also be a solution. However, you have to rewrite it for every different x and Variable 1 value.

if (x="P1" and SYSMIS(Variable1)) Variable1=45.

If there is only one not-missing value for each participant than eli-k's answer is perfect.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Gizi