Having searched the web, form and documentation I am stil stumped on something that must be really simple...how to format the values in a tabulate report. The default gives nnnnnnnnnn.nn , but I need comma format to make the report more readable.
This is the simplest of cross-tab reports.
OUT=SASUSER.STABSummaryTablesALL_EVENTS(LABEL="Summary Tables for ECLIB000.ALL_EVENTS")
CLASS TO_Product / ORDER=UNFORMATTED MISSING;
CLASS FROM_Product / ORDER=UNFORMATTED MISSING;
/* ROW Statement */
all = 'Total' ,
/* COLUMN Statement */
TO_Product *(amount=' ' * Sum=' ' )
all = 'Total' *(amount=' ' * Sum=' ' ) ;
If statistics based on AMOUNT are all you have in your table, then a very simple way to achieve the formatting you want is to do this:
proc tabulate data=xxxx.data f=comma16.
add the f= or format= option to the PROC TABULATE statement. It can go anywhere, but must be placed before the semi-colon that ends the statement.
In more complicated situations, such as where you want some statistics to have a comma16. format, but other statistics to have the comma16.2 format (for example), you would then need to request the format in the TABLE statement. Like this:
table Product all,
othervar*(amount=' '*Sum=' '*f=comma16.2)
all*(amount=' '*Sum=' '*f=comma16.0);
In EG tabulate is accessed through a wizard. When one selects the variable(s) to place in the tab construct there is no way to specify format. That is where it belongs (second screen in the EG wizard) - a useful addition - perhaps could be added to the development queue foir the benefit of the Base SAS challenged. ;-)
HI...my memory is that when you drag and drop the variables into the table designer in the Summary Tables Task, that there is a way to Right-click on the variable name and set the format. I think it's Properties off the Right-click menu that comes up.