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

Hi, I am a relatively new EG user (moving to also use DI later this year hopefully so DI comments are welcome also).

I understand how to do a Summary Grouping of one variable (by Country-Site-Month etc.) using the bottom window.

Is it possible to do different summary groupings in a single step? It seems inefficient to have to

create a new step for every different group. For example, create columns for (group by) COUNT by Country-Site-Month and then COUNT by Country-Site in the same project step. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

Boy have I got a task for you!

 

Here's an industrial-strength summarization engine, thanks to PROC MEANS.

 

From Enterprise Guide:

  1. Open the dataset you want to summarize (I'm using SASHELP.SHOES as an example).
  2. Select Describe -> Summary Statistics
  3. On the Data tab, pull the variables you want to summarize into "Classification Variables". I used Region, Product, and Subsidiary.
  4. On the Data tab, Pull one numeric variable into "Analysis Variables" (that's the only downside, you need one numeric variable, even though you don't use it for anything.) Make sure it's always non-null.
  5. On the "Statistics" "Basic" tab, untick everything except "Number of Observations".
  6. On the "Results" tab, untick "Show Statistics", and tick "Save statistics to data set". That will give you a summary dataset. Set "Combinations of classification variables" to "All ways".
  7. Click "Run".

 

You'll get a dataset that will show all of the 0-way (summary for the dataset), 1-way (Region, and 2 others), 2-way (Region by Product, and two others) and 3-way (all three variables) summarizations of the data.

 

Tom

View solution in original post

2 REPLIES 2
TomKari
Onyx | Level 15

Boy have I got a task for you!

 

Here's an industrial-strength summarization engine, thanks to PROC MEANS.

 

From Enterprise Guide:

  1. Open the dataset you want to summarize (I'm using SASHELP.SHOES as an example).
  2. Select Describe -> Summary Statistics
  3. On the Data tab, pull the variables you want to summarize into "Classification Variables". I used Region, Product, and Subsidiary.
  4. On the Data tab, Pull one numeric variable into "Analysis Variables" (that's the only downside, you need one numeric variable, even though you don't use it for anything.) Make sure it's always non-null.
  5. On the "Statistics" "Basic" tab, untick everything except "Number of Observations".
  6. On the "Results" tab, untick "Show Statistics", and tick "Save statistics to data set". That will give you a summary dataset. Set "Combinations of classification variables" to "All ways".
  7. Click "Run".

 

You'll get a dataset that will show all of the 0-way (summary for the dataset), 1-way (Region, and 2 others), 2-way (Region by Product, and two others) and 3-way (all three variables) summarizations of the data.

 

Tom

crawfe
Quartz | Level 8

That is pretty cool. For three columns, it gives you all possible two-way summaries also.

I am going to have to see how I can use it. Thanks!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 819 views
  • 1 like
  • 2 in conversation