After Using proc freq to get count and percent. I was trying to put count and percent together. Here is the code : proc freq data=tem1 ; by treatmnt; tables gender / out=gender0 noprint; tables race / out=race0 noprint; run; proc freq data=tem1; format percent commax10.1; tables gender /out=gender1 noprint; tables race /out=race1 noprint; run; data cate0; set gender0 (in=a0) gender1 (in=a1) race0 (in=b0) race1 (in=b1); if a0 then do; var=put(gender,gender.); stat = put(count, 3.) || ' ('||put(trim(percent), 4.) ||'%'|| ') ' ; end; if a1 then do; var=put(gender,gender.); stat = put(count, 3.) || ' ('||put(trim(percent), 4.) ||'%'|| ') ' ; end; if b0 then do; var=put(race, race.); stat = put(count, 3.) || ' ('||put(trim(percent), 4.) ||'%'|| ') ' ; end; if b1 then do; var=put(race,race.); stat = put(count, 3.) || ' ('||put(trim(percent), 4.) ||'%'|| ') ' ; end; run; Everything is working except the last value 50%. The last column is what I want to use for next step. Is there anyone knows how to fix this. Let 50.0% display
... View more