Here is the SAS code, with column numbers hard-coded, but at least it works:
options missing=0;
proc report data = some_dataset nowd missing;
column credit_load snapshotdate,(ones ones=onespct cumpct) dummy;
define credit_load / group 'Credit Load' ;
define snapshotdate / across '' order=internal;
define ones / analysis sum 'Freq' style(column)={tagattr="format:##0"} ;
define onespct / analysis pctn 'Pct' style(column)={tagattr="format:##0.0%"};
define cumpct / 'Cum Pct' style(column)={tagattr="format:##0.0%"};
define dummy / noprint;
COMPUTE BEFORE ;
cumtot1 = 0;
cumtot2 = 0;
ENDCOMP;
COMPUTE dummy;
cumtot1 + _c3_;
cumtot2 + _c6_;
_c4_ = cumtot1;
_c7_ = cumtot2;
IF _BREAK_="_RBREAK_" THEN DO;
_c4_=1;
_c7_=1;
END;
ENDCOMP;
rbreak after / summarize ;
run;
No comments:
Post a Comment