To use, but not print the Total_Handle_Time column, you must leave it in the COL statement (to allow it to be used in the calculation of the computed column) but add the NOPRINT in the DEFINE statement. See below. Not sure exactly what you need but you can also save the intermediate dataset the Proc REPORT creates, with the OUT= option, which might do you. And if so, you can run the Proc Report step right after your first Data step, unless you want the other temporary datasets later, by making the event_dt column a GROUP variable. So, your program could look like this... Data Work.AEC;
Set CARTEL.Employee_Telephony_agg;
Keep Event_DT QUEUE_CD QUEUE TOTAL_CALLS Total_Handle_Time;
Where QUEUE_CD in ('NAT_AEC' 'NAT_AEI' 'NAT_BVL' 'CLK_AECa_AustElectoralCommissionFedElectionServ')
and EVENT_DT >='02May2016'd;
Total_Handle_Time = TALK_TIME + WORK_TIME + HOLD_TIME + EXTENDED_WORK_TIME;
Run;
proc report data=Work.AEC out=final_aec(drop=_break_) ;
col EVENT_DT TOTAL_CALLS Total_Handle_Time AHT;
define event_dt / GROUP;
define TOTAL_CALLS / analysis sum ;
define Total_Handle_Time / NOPRINT analysis sum format=comma12.;
define AHT / computed format=mmss.;
compute AHT ;
AHT = Total_Handle_Time.sum / TOTAL_CALLS.sum;
endcomp;
rbreak after / summarize;
run; Guess you guys are pretty busy at the moment
... View more