Thanks Hai.kuo, in terms of the table you are right, but the "where condition" cant change in my code. I found a possible solution keeping my where condition, adding an extra condition: proc sql; create table totalx as select count(distinct subjid) as n, trt 'Treatment', 'number of subjects condition A' as col0 from new where fday ne . group by trt union select count(distinct subjid) as n, trt 'Treatment', 'number of subjects condition B' as col0 from new where fday ne . and tday le 0 group by trt order by col0; quit; proc transpose data=totalx out=totalt (drop=_name_) prefix=trt; by col0; id trt; var n; run;
... View more