As I am not skilled in PROC TABULATE, I provide a PROC REPORT solution. Please note: I don't think there is a way to get the month into the name of variables in PROC REPORT or PROC TABULATE, and furthermore it is redundant, and at least in my opinion unnecessary to put the same information that is in the title elsewhere in the table. Nevertheless, using a title statement and BY statement like this ought to work in PROC TABULATE as well, but I am not able to provide that code.
proc sort data=sashelp.pricedata(where=(year(date)=1998)) out=pricedata;
by date productline;
run;
options nobyline;
title "Table of Price Data for #byval1";
proc report data=pricedata;
by date;
columns productname (" " productline),(sale price);
define productname/group;
define productline/across " ";
define sale/sum format=comma10.0;
define price/sum format=dollar12.2;
run;
In addition, I think the productname column ought not to have the text "Product" (this is very redundant and takes up unnecessary space visually) in the product name, and the numbers sorted so that 2 follows 1 instead of 10 follows 1.
... View more