| |||||||||||||||||||||||||||||||
The above report gets total and %'s in total column .
(i want 26% in totals)
plz help me
You can use Proc REPORT to get the output you need. You can make use of the computed column functionality:
<
/body>
Hi,
proc sql;
create table WANT as
select *
from HAVE
union all
select "Total" as YEAR,
count(X) as X,
count(Y) as Y,
round((CALCULATED Y / CALCULATED X) * 100,1.) as PERCENT
from HAVE;
quit;
And a Tabulate solution
proc tabulate data=have;
class year;
var x y;
table year='' all='Total',
x *sum=''*f=best4. y=''*(sum='y'*f=best4. pctsum<x>='%'*f=best4.)
/box='Year' ;
run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.