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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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