Desktop productivity for business analysts and programmers

How to create a report using proc tabulate by reading two datasets

Reply
Occasional Contributor
Posts: 5

How to create a report using proc tabulate by reading two datasets

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

Super User
Super User
Posts: 7,720

Re: How to create a report using proc tabulate by reading two datasets

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.

Super Contributor
Posts: 415

Re: How to create a report using proc tabulate by reading two datasets

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".

Super User
Posts: 11,134

Re: How to create a report using proc tabulate by reading two datasets

"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.

 

 

 

Ask a Question
Discussion stats
  • 3 replies
  • 350 views
  • 0 likes
  • 4 in conversation