尝试Proc Tabulate:
PROC TABULATE DATA=WORK.HAVE;
VAR amount calculated members;
CLASS year_month / ORDER=UNFORMATTED MISSING;
CLASS category1 / ORDER=UNFORMATTED MISSING;
CLASS category2 / ORDER=UNFORMATTED MISSING;
TABLE /* Row Dimension */
year_month*
category1,
/* Column Dimension */
category2*(
amount*
Sum
calculated*
Sum
members*
Sum);
;
RUN;
语法总是令我困惑。尝试使用Enterprise Guide和“Summary Tables”任务为您创建代码!