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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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