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

I'm a SAS EG user and have limited experience with direct SAS programming. I'm currently using SAS EG version 8.2 Update 1 (8.2.1.1223). I would like to accomplish this project in SAS EG if possible.

 

I have two tables with the same variables and I would like to compare the two tables. Each table has the same 50 variables.

 

I would like to compare the frequency of values for 28 of the variables shared between the two tables by showing the total frequency for each value within those variables in each table. Additionally, I would like to see the percent change in those frequencies between the two tables.

 

Is this possible in SAS EG?

 

Any guidance is appreciated - Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Yes it's possible. It's not possible to do it in one step though, using EG tasks. 

 

1. Create a summary table for table 1 - use a task, store it to a dataset

2. Create a summary table for table 2 - use a task, store it to a dataset

3. Merge the two data sets by the common key variable, your category. Use Query Builder here

4. Create a computed column that will calculate the difference. Either use Query Builder again or modify your code from Step #3.

 

View solution in original post

2 REPLIES 2
Reeza
Super User

Yes it's possible. It's not possible to do it in one step though, using EG tasks. 

 

1. Create a summary table for table 1 - use a task, store it to a dataset

2. Create a summary table for table 2 - use a task, store it to a dataset

3. Merge the two data sets by the common key variable, your category. Use Query Builder here

4. Create a computed column that will calculate the difference. Either use Query Builder again or modify your code from Step #3.

 

runningjay
Fluorite | Level 6

Thanks for the insight and the steps on how to do this. I appreciate the help.

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!

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