Is this possible? I am running a tabulate that then creates a table using ods. In the tabulate (and therefore the output table) I want to see all possible combinations of variables, even if the total is zero. So I want to ensure that all possible row and column headings are in the tabulate, even if they contain no data and where the data does not exist I want the table to contain a zero not a period.
Is this easy? I've been trying to use printmiss and preloadfmt but I don't know the syntax and can't seem to find any non-confusing online resource.
This is an example of my tabulate so far:
proc tabulate data=dataset;
class char1 char2;
table char1, char2*values / printmiss;
ods output table=fred;
Where do I put the preloadfmt or am I chasing a red herring up the wrong tree again?
PRINTMISS goes on the TABLE statement, after a slash and PRELOADFMT goes on the CLASS statement for the CLASS variable whose format should be loaded. And then, of course, you need to make sure the format is assigned by having a FORMAT statement in the program (or by making surethe format is permanently assigned). This Tech Support note has some nice sample code: http://support.sas.com/kb/25/101.html