BookmarkSubscribeRSS Feed
Thokozani
Calcite | Level 5

Hi All,

 

Is there a way to create create one report using proc tabulate by reading two datasets?

 

Please find sample layout attached.

 

Regards,

Thokozani

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

There probably is.  Depends on how your data relates to each other.  You would either need to summarise each then merge together, or merge together and then summarise.  Hard to say, please provide test data (in the form of a datastep) for each of your data and might be able to see.

jklaverstijn
Rhodochrosite | Level 12

RW9 was right on the money. Pre-summarization is the way. And please provide some sample data.

 

Just to make certain upfront: there is no way to specify two tables in the PROC TABULATE statement/ It's just not in the syntax. A view would be the closest you can get to "Tabulate reading two datasets".

ballardw
Super User

"Table" has enough uses that one needs to be just a bit precise when mixing usages (Data table, report table, table statement as a minimum). Which is why SAS often refers to data sets for the data, referenced in most procedures with statement data=, and table for output.

 

Proc Tabulate and most procedures accept a single dataset as input. Many of the procedures produce multiple tables as output.

Proc Tabulate does support multiple Table statements in a single procedure call, so you can get significantly different bits of output with a single data set reference. But the input will only be a single data set.

 

 

 

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!

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
  • 3 replies
  • 1011 views
  • 0 likes
  • 4 in conversation