BookmarkSubscribeRSS Feed
Russell
Calcite | Level 5
Hey everyone,
Quick question. Is it possible to use two different data sets to produce the same report on the same tab? My output is an XML file using ODS.

i.e.:

Data set 1 contains data from 3/21 - 3/27.
Data set 2 contains data from 2/1 - 3.27.

The chart I want to build has grouping and analysis variables... so the column headers would be

Market......Var1.... Var2.... Var3.... etc....

And I would want my data to be grouped as:

(from data set 1)

Market 1.....4........54......2.8.....etc..
Market 2.....3........48......3.2.....etc...
Market 3.....5........55......1.8.....etc...

(from data set 2 in a separate table)

Market 1.....4.8.....49......3.8....etc...
Market 2.....3.1....54.......3.3....etc....
Market 3.....4.4....49.......2.3....etc....

Is this possible? Or will it just always be produced on another tab within the output file? Or can I create a subset of data within the PROC REPORT statement?

Thanks!
2 REPLIES 2
SASKiwi
PROC Star
I assume you are outputing to Excel using EXCELXP tagsets although you don't say so explicitly.

If so then you can use:

ods tagsets.excelxp options (SHEET_NAME = 'Mytab' SHEET_INTERVAL = 'NONE') ;

before your PROC REPORT code so that the two reports stay in the same tab.
Russell
Calcite | Level 5
Yes, sorry I wasn't explicit... but that works perfectly! Thank you!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1095 views
  • 0 likes
  • 2 in conversation