ods graphics on;  proc format;  value typeformat 1="X1" 2="X2" 3="X3" 4="X4";  value $styleformat a="Y1" b="Y2" c="Y3" d="Y4" e="Y5";  run;  data work;  input style$ r1-r12;  cards;  a 1  2  3 4 5 6 7 8 9 10 11 12  b 1  2  3 4 5 6 7 8 9 10 11 12  c 1  2  3 4 5 6 7 8 9 10 11 12  d 1  2  3 4 5 6 7 8 9 10 11 12  e 1  2  3 4 5 6 7 8 9 10 11 12  ;  proc transpose data=work out=work1 (rename=(col1=results));  by style;  data work2;  set work1;  n=_n_;  format type typeformat. style styleformat.;  Do repeat = 1 to 60 ;  Do type = 1 to 4 ;  Do times = 1 to 3 ;  Output ;  End ;  End ;  End ;  Drop _name_;  Run ;  proc print data=work2;  run;      This is where N=60, not 45. And using Richard's earlier method.  Okay I changed the data and the names obviously because this is work stuff. I was given data which was:  factor:"style" which has 5 levels a,b,c,d,e  factor:"type" which has 4 levels 1,2,3,4  And there are 3 repeats of each combination       1          2               3          4  a [1  2  3][ 4 5 6] [7 8 9] [10 11 12]  b [1  2  3][ 4 5 6] [7 8 9] [10 11 12]  c [1  2  3][ 4 5 6] [7 8 9] [10 11 12]  d [1  2  3][ 4 5 6] [7 8 9] [10 11 12]  e [1  2  3][ 4 5 6] [7 8 9] [10 11 12]    So that's what data I was given, I input style and the results, transposed it, added "type".    Wrong?      
						
					
					... View more