I've searched through the knowledge base, web and message boards and I could not find a similar example, although I know it exist somewhere. So, I have a small data set data salaries;
input team $ type $ salary bonus;
datalines;
Ben OFF 150000 5000
Tom OFF 200000 2000
Jerry OFF 140000 1500
Al DEF 80000 1000
Bill DEF 90000 2000
;
run;
quit; and I'm trying to group and calculate the salary + bonus (salary_plus). proc report data=salaries;
column type team salary salary_plus bonus;
define type / group 'Type';
define team / display;
define bonus / analysis format=dollar32.2 sum;
define salary / analysis format=dollar32.2 sum;
define salary_plus / computed noprint ;
compute salary_plus;
salary_plus= bonus+salary;
endcomp;
break after type / summarize
style=[font_weight=bold background=lightgray];
compute after type ;
line 'Total ' salary_plus dollar7.2;
endcomp;
run;
quit; I'm getting the correct report structure, but at the very end for the Total, I'm getting a null value. I'd like for it to say $200,000 for DEF and $498,500 for OFF
... View more