| |||||||||||||||||||||||||||||||
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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.