Hi there: Have the following situation where I am using proc report. I have used the basic report and runs good. Now I have been asked to create an additional column as part of the COLUMN (NOT a ROW) statement where I need to include Sub-totals by ID#. The ID# is a unique variable which I defined as group. The same ID can be found multiple times and the Approval number reflects its frequency. Any help would be highly appreciated This my example basic code included below: ID# INDUSTRY Approvals Sub-Totals by ID (Needed variable) 985623 Computer & Programming 1 111 123 456 Computer & Programming 2 123 23 836 (Needed - sum of all approvals under ID 985623) 526314 Computer & Programming 3 896 563 896 Computer & Programming 4 456 563 41 3,415 (Needed- sum of all approvals under ID 526314) Grand Total 4,251 4,215 PROC REPORT DATA=FINAL NOWD MISSING; COLUMN ID INDUSTRY APPROVALS; DEFINE ID /GROUP DESCENDING ORDER=FREQ 'ID'; DEFINE INDUSTRY/GROUP 'INDUSTRY'; DEFINE APPROVALS/ SUM 'APPROVALS'; BREAK AFTER/SUMMARIZE; RUN;
... View more