I am using the following code:
proc report data=work.authsummary_h
nowd colwidth=10 spacing=5 headskip headline split='*' ;
column monthnum monthname trans_outcome2 card_type, frequency ,(sum pctsum) grand_tot ;
define monthnum / group order=data noprint ;
define monthname / group 'Month' order=data ;
define trans_outcome2 / group ' ' ;
define card_type / across 'Cardtype' ;
define frequency / analysis sum ' ' format=comma12. ;
define grand_tot / computed 'Grand Total' format=comma12. ;
define sum / ' ' format=comma15. ;
define pctsum / ' ' format=percent6.1 ;
break after monthname / summarize skip suppress;
compute grand_tot ;
grand_tot=_c5_+ _c6_+ _c7_+ _c8_+ _c9_ ;
endcomp ;
rbreak after /summarize ;
run ;
to generate an output similar to this:
type1 type2 GrandTotal
Mar approved 76,200 31% 5,391,685 34% 6,728,391 33%
declined 5,245 2.1% 116,789 0.7% 185,366 0.9%
81,445 33% 5,508,474 34% 6,913,757 34%
Apr approved 74,359 30% 4,949,625 31% 6,188,047 31%
declined 4,655 1.9% 104,994 0.7% 169,216 0.8%
79,014 32% 5,054,619 31% 6,357,263 31%
May approved 82,624 33% 5,392,424 34% 6,758,968 33%
declined 5,386 2.2% 111,731 0.7% 180,305 0.8%
88,010 35% 5,504,155 34% 6,939,273 34%
248,469 100% 16,067,248 100% 20,210,293 100%
However, for each month, I would like the % split to show as a % of the month
subtotal. For example, for March:
corp delta delta Grand
Mar approved 76,200 94% 5,391,685 98% 6,728,391 97%
declined 5,245 6% 116,789 2% 185,366 3%
81,445 100% 5,508,474 100% 6,913,757 100%
Then for the grand total at the bottom of the report, I would only want to show
the total figs (ie no percentages)
Is this possible using proc report?
proc report data=work.authsummary_h
nowd colwidth=10 spacing=5 headskip headline split='*' ;
column monthnum monthname trans_outcome2 card_type, frequency ,(sum pctsum) grand_tot ;
define monthnum / group order=data noprint ;
define monthname / group 'Month' order=data ;
define trans_outcome2 / group ' ' ;
define card_type / across 'Cardtype' ;
define frequency / analysis sum ' ' format=comma12. ;
define grand_tot / computed 'Grand Total' format=comma12. ;
define sum / ' ' format=comma15. ;
define pctsum / ' ' format=percent6.1 ;
break after monthname / summarize skip suppress;
compute grand_tot ;
grand_tot=_c5_+ _c6_+ _c7_+ _c8_+ _c9_ ;
endcomp ;
rbreak after /summarize ;
run ;
to generate an output similar to this:
type1 type2 GrandTotal
Mar approved 76,200 31% 5,391,685 34% 6,728,391 33%
declined 5,245 2.1% 116,789 0.7% 185,366 0.9%
81,445 33% 5,508,474 34% 6,913,757 34%
Apr approved 74,359 30% 4,949,625 31% 6,188,047 31%
declined 4,655 1.9% 104,994 0.7% 169,216 0.8%
79,014 32% 5,054,619 31% 6,357,263 31%
May approved 82,624 33% 5,392,424 34% 6,758,968 33%
declined 5,386 2.2% 111,731 0.7% 180,305 0.8%
88,010 35% 5,504,155 34% 6,939,273 34%
248,469 100% 16,067,248 100% 20,210,293 100%
However, for each month, I would like the % split to show as a % of the month
subtotal. For example, for March:
corp delta delta Grand
Mar approved 76,200 94% 5,391,685 98% 6,728,391 97%
declined 5,245 6% 116,789 2% 185,366 3%
81,445 100% 5,508,474 100% 6,913,757 100%
Then for the grand total at the bottom of the report, I would only want to show
the total figs (ie no percentages)
Is this possible using proc report?