Then run this code, based on my earlier "have" dataset:
proc sql;
create table flag as
select
paramcd,
case
when count(distinct aval) = 1
then 'Y'
else ' '
end as flag
from have
group by paramcd
having flag = 'Y';
quit;
data want;
merge
have
flag
;
by paramcd;
if not first.paramcd then flag = ' ';
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.