Hello @antona, welcome to the Community!
Is var numeric or alphanumeric?
If it is alphanumeric try:
data killList;
set have;
by id;
retain onlyZeros;
if first.id then onlyZeros = 1;
if var = '1' then onlyZeros = 0;
if last.id and onlyZeros then output;
keep id;
run;
data want;
merge have killList(in= removeIt);
by id;
if removeIt then delete;
run;
... View more