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!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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