proc import datafile="~bank.xls" out= bank dbms=excel replace;
getnames=yes;
run;
proc report data=bank nowd;
column accttype branch amount,sum;
define accttype/group;
define branch/across;
define amount /sum;
run;
OUTPUT:
18:48 Wednesday, September 28, 2011 34
Branch Amount
AcctType Central North County Westside sum
CD 97 60 54 3145845
Checking 158 61 59 1487914
IRA 8 15 5 212754
Savings 99 61 35 1689259
Is it possible to see amount in place of no of records ie. 34000 or (whatever sum is) in place of 97 , 60 54 or all????????????
Hi Aman,
I think this code might help you.. please change the data set name as per your records..
proc report data=bank nowd; | |
column acctype (branch,amount); | |
define acctype / group; | |
define branch / across; | |
define amount / sum ; | |
run; |
--
Durga.
Hi Aman,
I think this code might help you.. please change the data set name as per your records..
proc report data=bank nowd; | |
column acctype (branch,amount); | |
define acctype / group; | |
define branch / across; | |
define amount / sum ; | |
run; |
--
Durga.
You can get the output you want with proc tabulate procedure as well, here is the code for that
proc tabulate data=bank;
class accttype branch;
var amount;
tables (amount)*sum, accttype,branch all="Amount sum";
run;
Thanks,
Jagadish
Thanks for your kind help.
i would like to share my effort with you please suggest me and please any one can help me to know what is the use of 'nofs' ?
proc report data=bank nowd ;
column accttype branch,amount amount;
define accttype/group;
define branch/across;
define amount /analysis sum;
compute after;
Accttype="Total:";
endcomp;
rbreak after / dol dul summarize;
run;
The options nofs and nowd are both same. By using these option we are preventing the proc report directing the output to report window. The output is displayed in the normal output window instead of report window.
The default if we are not mentioning any option is proc report will send the output to report window.
Thanks,
Jagadish
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.