BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pangea17
Quartz | Level 8

I am using enterprise guide 9.3.  I have a dataset that has mutiple rows for a customer.  I want to look at how many contacts a customer has a well as payments over the course of a month.

 

I am using a proc means to summarize the data.

 

proc means data = gregory n;

class primekey agency employeecode;

var count;

where blank is eq to "contacts";

output out = contacts n;

RUN;

 

proc means data = gregory n;

class primekey agency employeecode;

var count;

where blank is eq to "promise";

output out = promises n;

RUN;

 

What I want to do is merge the two output datasets by primekey to have a result:

primekey      # contacts       #promises  agency employeecode   etc.

abc                10                   3

 

The problem I am having is that I get _type_ and _freq_ variables, which I can drop using (drop= _type_  _freq_),

however I get summaries for multiple _types_.  I only want to keep the one where all the variables are listed out.   

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Add this option to the PROC MEANS statement:  NWAY

View solution in original post

2 REPLIES 2
Astounding
PROC Star

Add this option to the PROC MEANS statement:  NWAY

pangea17
Quartz | Level 8

Thanks for the assistance!

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1190 views
  • 3 likes
  • 2 in conversation