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-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!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 994 views
  • 1 like
  • 2 in conversation