Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum Observations

Status
Not open for further replies.

americsg1

Technical User
Dec 2, 2002
12
US
Hello,

I've been trying to figure out a way to sum similiar observations to create a total.

The programs below display IVR usage for the English and Spanish modules. How can I add the event results together to create one dataset?

PROC SQL;
create table in101 as
select calr_id, event, init_cret_dt
from ivrevent.ivr0706
where event = 'IN REGION 1';
create table in101_1 as
SELECT *
FROM ivrevent.ivr0706
WHERE calr_id in
(SELECT calr_id
FROM in101
WHERE calr_id >('0') and calr_id < ('900000000000'));
PROC FREQ data= in101_1;
tables EVENT / out= IVREVENT.REGION_1;
Where EVENT IN (

'REGION 1 CS ACD',
'1. MAIN MENU PAYOFF',
'2. MAIN MENU MAKE PAYMENT',
'3. MAIN MENU BILLING',
'4. MAIN MENU EOT',
'5. MAIN MENU VEH RETURN',
'0. BILLING MENU ZERO',
'0. EOT MENU ZERO',
'0. MAIN MENU ZERO',
'0. PAYOFF MENU ZERO',
'0. PAYMENT MENU ZERO',
'IN REGION 1',
'AUTHENTICATION VALID',
'TRANSFERED TO SPEEDPAY',
'DEALER CALLS'
);
run;
----------------------------------------------------------
PROC SQL;
create table in101 as
select calr_id, event, init_cret_dt
from ivrevent.ivr0706
where event = 'SP IN REGION 1';
create table in101_1 as
SELECT *
FROM ivrevent.ivr0706
WHERE calr_id in
(SELECT calr_id
FROM in101
WHERE calr_id >('0') and calr_id < ('900000000000'));
PROC FREQ data= in101_1;
tables EVENT / out= IVREVENT.REGION_1_SP;
Where EVENT IN (

'SP REGION 1 CS ACD',
'SP 1. MAIN MENU PAYOFF',
'SP 2. MAIN MENU MAKE PAYMENT',
'SP 3. MAIN MENU BILLING',
'SP 4. MAIN MENU EOT',
'SP 5. MAIN MENU VEH RETURN',
'SP 0. BILLING MENU ZERO',
'SP 0. EOT MENU ZERO',
'SP 0. MAIN MENU ZERO',
'SP 0. PAYOFF MENU ZERO',
'SP 0. PAYMENT MENU ZERO',
'SP IN REGION 1',
'SP AUTHENTICATION VALID',
'SP TRANSFERED TO SPEEDPAY',
'SP DEALER CALLS'
);
run;

Thank you.
 
Post some sample data.
You'll probably be looking at Proc MEANS/SUMMARY which will sum variables by a grouping variable.
 
Thanks for the reply, I managed to create the results I was seeking after all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top