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"?
You can assign labels to variables or statatistics in Tabulate with ='Label text' after the item.
table (all='Total' sex)*date*weight ....
Sorry, I should clarify:
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.
data want;
set output.test;
/* 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';
run;
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.