01-30-2017 10:44 AM
if you do
proc tabulate [...]
table (all sex)*date*weight*(sum)
It will make the "all" in sex have just a period '.'.
How can I make it say "Total"?
01-30-2017 10:47 AM
You can assign labels to variables or statatistics in Tabulate with ='Label text' after the item.
table (all='Total' sex)*date*weight ....
01-30-2017 10:52 AM
Sorry, I should clarify:
01-30-2017 11:58 AM
You have a couple options but if your variable is numeric th only one you have is a custom format. You could use a data step and make sure that the length of character variables are set long enough to add text as needed with the values of the _type_ variable.
/* this is a guess based on your code you need to inspect the actual table to get the
if _type_ in ('000','010') then prov='Canada';
might work but if you have a numeric then you cannot place character values into a numeric column.
A custom format such as
proc format library=work; value $Prov ' '='Canada' ; run;
would display Canada for the missing values of prov and the original values if prov is character. If you have an existing numeric format for categories then adding a category for .='Canada' or .='Total Industry' for your naics4 variable would work.
Note that this approach will not work if you use MISSING on your class variables as you have two types of missing possible and you would have to move into the realm of special missing and formats to get desired output.