'Retaining first value across multiple rows
Hello,
Simple question. How do I keep the first score (AVALXC) once in the first row and the rest of the crows column blank per PATID?. so PATID 10017 would have a score of 12 for row 1 but wouldn't repeat and then the same for 100022 etc.This is what I tried.
proc sql;
create table distinctSSI as
select distinct SUBJID
,AVALXC
from adtte
where AVALXC is not null
order by 1;
quit;
proc sort data=adtte; by SUBJID;
data FINALa;
merge adtte (drop=AVALXC)
distinctSSI;
by SUBJID;
RUN;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

