10-05-2011 02:43 PM
A few comments. Are you expecting TABULATE to summarize the data and calculate the percents or have you "pre-summarized" the data and calculated the percents? The reason I ask is that you do not show what your INPUT data set (SBO_MEDATA) actually looks like. You show what PROC TABULATE is giving you. I am surprised that your posted code is working at all. I note several issues:
1) you have a mismatched quote as shown below:
|--mismatched single quote
should probably be:
2) you use COUNT in the TABLE statement, but it does not appear in your CLASS or VAR statement, which I would expect would result in the following ERROR message. (Perhaps this should be LOANCOUNT)
ERROR: The type of name (Count) is unknown.
3) you also use AVG in the TABLE statement, but it does not appear in your CLASS or VAR statement, (Perhaps this should be UPBAVG)
which I would expect would result in the following ERROR message.
ERROR: The type of name (AVG) is unknown.
It helps folks figure out what you really want, if you can show them working code and a sample of the input data -- you have shown an example of the output report, but without the other 2 pieces of the puzzle -- it is hard for anyone to provide really useful help. If you cannot post a sample of the input data, then either make some fake data (using a DATALINES section in a DATA step program) or use one of the existing SASHELP datasets to illustrate your code question. For example, SASHELP.PRDSALE has a REGION variable with only 2 values, EAST and WEST; a COUNTRY variable with 3 values; a PRODTYPE variable with 2 values; numeric variables ACTUAL and PREDICT and date-based variables MONTH, YEAR and QUARTER.