BookmarkSubscribeRSS Feed
zetter
Calcite | Level 5

How do I  proc tabulate from  multiple tables but report results on a single table?

I have got 3 tables like this:

Table A

Id      item   opinionscore

11        car      1

12        car      3

Table B

Id      item   opinionscore

11        plate     1

12       plate     1

Table c

Id      item   opinionscore

11        cup     1

12       cup 4

I want to create a combined by proc tabulate and report on excel as follows.

Item

Total Score

car

4

plate

2

cup

5

total

11

1 REPLY 1
Reeza
Super User

You'll have to combine the tables somehow first or combine the results at the end, I'd suggest combining the tables first. You could also create a view if your tables are big and you don't want to take up the storage space.

data all;

set tablea tableb tablec;

run;

And then run your proc tabulate Smiley Happy

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 992 views
  • 0 likes
  • 2 in conversation