Hi, well, with nestings like that, PROC REPORT thinks you have the possibility of 48 total ACROSS columns 3 variables (total, defects,percent) times 4 possible values for DOW times 4 possible values for DATE -- so 3*4*4 = 48. You can prove this to yourself by getting rid of the NOZERO and something like this is what you see:
So unfortunately when you nest multiple variables in the ACROSS you are telling PROC REPORT to make absolute column numbers for all the POSSIBLE combinations - not all the ACTUAL combinations.
If this is what you want:
I did that with a user-defined format:
** need to use ^ as the split character in PROC REPORT step;
proc format;
value dtdow '14sep17'd = '09/14/2017^Thu'
'15sep17'd = '09/15/2017^Fri'
'16sep17'd = '09/16/2017^Sat'
'17sep17'd = '09/17/2017^Sun';
run;
Proc report data=TEST split = '^'
style(summary)=Header
style(column)=[font_size=8pt] nowindows;
column WIDGET
DATE, (TOTAL DEFECTS PERCENT);
define WIDGET / group ' Widgets ' style(column)={just=left };
define DATE / across ' Date ' FORMAT=dtdow.
style(column)={just=center } ;
define TOTAL / sum 'TOTAL' F=COMMA7.
STYLE(column)={just=center };
define DEFECTS / sum 'DEFECTS' F=COMMA7.
STYLE(column)={just=center };
define PERCENT/ computed 'PERCENT' f=PERCENT9.2
style(column)={just=center } ;
compute PERCENT;
_c4_ = _c2_ / _c3_ ;
_c7_ = _c5_ / _c6_ ;
_c10_ = _c8_ / _c9_ ;
_c13_ = _c11_ / _c12_ ;
endcomp;
rbreak after / summarize;
Run;
I did not bother using all of your cellwidths because I don't use cellwidths without a unit of measure and I did not use TAGSETS.EXCELXP because the column headers and nestings for ACROSS will be the same no matter what destination you use.
Hope this helps.
cynthia
ps -- in the future, it's better to post a new topic and then refer to an older posting if it is relevant. That way, people don't have to read all the way through the previous posting to get to your question and answer.
... View more