Hi everyone, Hoping someone might be able to give me a hand. I'm newer to SAS and am using Proc Report for the first time. I have the following code: %Macro PerCapitaReport(Dx);
Proc Report Data=Mitacs.Merge Missing;
Where &Dx=1;
Title "&Dx";
Column Province &Dx, (n sum pctn) Population PerCapita Age, Mean;
Define Province / group style (column) = Header;
Define &Dx / sum;
Define n / 'Count' f=comma6.;
Define sum / 'Sum';
Define pctn / 'Percent' f=percent9.2;
Define population / 'Population' group style (column) = Header f=comma12.;
Define percapita / computed 'Rate Per/10,000 Population' f=12.2;
Define age / 'Mean Age' f=9.;
Rbreak after / summarize style(summary) = Header;
Compute percapita; percapita=(&Dx..sum / population)*10000;
Endcomp;
Compute After; Province = 'Total/Mean';
Endcomp;
Run;
%Mend PerCapitaReport;
%PerCapitaReport(Arthritis) which generates the following table: However, as you can see, I can't seem to get a grand mean total for the 'Rate per 10,000 population' column. I've read through a number of guides and tried a bunch of things, to no avail. Appreciate any assistance anyone can offer 🙂
... View more