I would like to use the ODS tagsets sheet_interval option with a macro variable to create separate sheets for a frequency of each variable within the macro. For example, here I want separate tabs showing the values by year and state for "make," "model," and "color":
Right now, this code gives my a file with a separate tab for every table combination (e.g.one tab for the "make" table where year=2011 and state=alabama; one for the "make" table where year=2011 and state=alaska; etc.). Ideally, it would separate JUST on the macro variables so one "make" tab will have the cross-sections of every make by year and state - three tabs in total. Can someone help me see what I'm doing wrong?
You are getting a sheet per each table as the default. I might expect you to get a message as '&varlist' doesn't resolve your variables would not be valid options for sheet_interval which can be Table, Page, Bygroup, Proc, and None.
If I want to control output in the manner you are suggesting I would suggest sending the desired output to datasets using ODS OUTPUT and then using another report procedure that would allow use of year and state as either page variables with the PAGE interval or by variables and the BYGROUP sheet interval.