I am using proc tabulate to create a table like the one below. It is intended to count the number of observations for each hospital location by year. Additionally, I would like to generate column percentages for each year's observations. I was able to create my desired layout, but my column percentage totals are coming out to 0%. They should be 100%. I can't seem to figure out what has happened with my nesting to cause this error. Any assistance would be greatly appreciated! This is the code that I am using: proc tabulate data=mydata ; CLASS location specdateYR/ PRELOADFMT order=data; CLASSLEV location specdateYR/ S=[background=bigb foreground=white]; TABLE location = ' ' (ALL = {label='Total' S=[background=bigb foreground=white]}), (specdateYR = ' ' (All= {label='Total' S=[background=bigb foreground=white]})) *((N= {label='N Events' S=[background=bigb foreground=white]}) ((colpctn= {label='% Events' S=[background=bigb foreground=white]})*f=pctfmt.)) /misstext='0' BOX=[label='Events By Year and Location*' S=[background=bigb foreground=white]]; run;
... View more