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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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