I recently ran into a request (that I have seen before) about putting two statistics into the same cell. Apparently, APA Style requires this type of report that has the N in the same cell as the percent (with the percent in parentheses).
Each cell would look like this: xx,xxx (xx%) using the comma format for the N and the percent format for the percent.
The way I would handle this in the past is create and save the statistics, then, in a data step, convert them to character fields, concatenate them together and then use proc report or proc print to print the report.
My question is, is there a way I can do this directly in any procedure? It would be nice to get this out of proc tabulate without doing the extra data step. Or is there any other more efficient way to do this that I haven't even thought of?
A lot of folks use PROC REPORT directly (with a COMPUTE block) to concatenate the 2 numeric vars into a character var; or they use a combination of DATA step to do the "data massaging" (such as indicating what lines to indent or which lines to bold) and then PROC REPORT to to the report. Some folks (who need more control) use DATA _NULL_ and a custom TABLE template.
If you look at this paper, you can see 3 different types of this report. Generically, I called them "demographic" reports, because this is what my students always called them. There are 2 versions of Example 1 (both use PROC REPORT) on massaged data and 1 version of Example 8 (which uses DATA _NULL_ and a custom TABLE template.)