I was only trying to show an example of what the report should look like. I tried pasting, and it pasted as HTML successfully, but was not allowed to post. I'll work on creating a text version of what I'm looking for. Since I can't share my actual data or code, sample code would look something like this: data sample;
format vintage $4. type $6. amount dollar5.;
input vintage $ type $ amount;
cards;
2014 Type_A 20
2014 Type_B 10
2014 Type_C 30
2015 Type_A 10
2015 Type_B 30
2015 Type_C 30
2016 Type_A 30
2016 Type_B 10
2016 Type_C 30
2017 Type_A 20
2017 Type_B 10
2017 Type_C 30
;
run;
proc tabulate data=sample;
var amount;
class vintage type;
table /* ROW Statement */
vintage =" " all="Total",
/* COLUMN Statement */
type =' '*amount=" "*sum=" "*f=dollar5. all="Total"* amount=" "*
sum=" "*f=dollar5./box="Vintage";
run; The resulting report is a very simple summary with totals. What I would like to add is another row at the bottom with percentages of the total column as a percent of the sum total of all. All of the examples I find are adding additional columns for percentages, which wouldn't work for this report. It's an extremely easy thing to export or use ods to get the data out into Excel and then add the percentage afterward, but I like to keep everything as automated as possible. I would like to think that if it's easy to do in Excel, I should be able to do it in SAS. Any ideas?
... View more