I'm creating a report where I calculate changes between months based on the first across variable. I have managed to insert the columns within the across and calculate the changes. Now I want to title each type of change correctly. The report will ultimately end up in Excel. I'm programming within SAS EG 7.15, (SAS BASE 9.4). Currrent Report Top, Desired Report Bottom Proc format;
value ex_column
'31jul2019'd='Jul2019'
'31aug2019'd='Aug2019'
'15sep2019'd='Change'
;
Run;
Proc Report data=work.report_data_incomplete1
(where=((crs_site = 'F') and datekey in ('31jul2019'd, '31aug2019'd) and RTTPart='Part_2'))
out=work.proc_report1;
Title1 "TOTAL";
COLUMN ProvOrgName Label,Datekey,(Stats1);
define provorgnAME / ' ' group;
/*define sort_order /noprint across format=sort_order. preloadfmt order=data '';*/
define label / '' across order=data ;
define datekey / across nozero format=ex_column. preloadfmt '' order=data ;
define stats1 /'' ;
compute stats1;
_c4_=_c3_-_c2_;
_c7_=_c6_-_c5_;
_c10_=(_c9_-_c8_)/_c8_;
_c13_=_c12_-_c11_;
_c16_=_c15_-_c14_;
_c19_=_c18_-_c17_;
call define ('_c2_','format','4.1');
call define ('_c3_','format','4.1');
call define ('_c4_','format','4.1');
call define ('_c5_','format','4.1');
call define ('_c6_','format','4.1');
call define ('_c7_','format','4.1');
call define ('_c8_','format','bestd8.');
call define ('_c9_','format','bestd8.');
call define ('_c10_','format','percentn6.1');
call define ('_c11_','format','8.');
call define ('_c12_','format','8.');
call define ('_c13_','format','8.');
call define ('_c14_','format','8.');
call define ('_c15_','format','8.');
call define ('_c16_','format','8.');
call define ('_c17_','format','percentn6.1');
call define ('_c18_','format','percentn6.1');
call define ('_c19_','format','percentn6.1');
endcomp;
run;
... View more