TITLE;
TITLE1 "TDR RCDA";
FOOTNOTE;
FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
/* -------------------------------------------------------------------
Code generated by SAS Task
Generated on: Monday, March 27, 2017 at 5:00:40 PM
By task: Summary Tables7
Input Data: WORK.QUERY_FOR_CTRL_X_RISK_L_0000
Server: SASApp
------------------------------------------------------------------- */
/* -------------------------------------------------------------------
Run the tabulate procedure
------------------------------------------------------------------- */
PROC TABULATE
DATA=WORK.QUERY_FOR_CTRL_X_RISK_L_0000(FIRSTOBS=1 )
;
VAR LOSS_AMT;
CLASS RISK_ID / ORDER=UNFORMATTED MISSING;
CLASS RISK_NM / ORDER=UNFORMATTED MISSING;
CLASS RISK_DESC / ORDER=UNFORMATTED MISSING;
CLASS CONTROL_AUTOMATION_TYPE_CD / ORDER=UNFORMATTED MISSING;
CLASS CONTROL_INST_DESC / ORDER=UNFORMATTED MISSING;
CLASS DISCOVERY_DT / ORDER=UNFORMATTED MISSING;
CLASS "likely hood"n / ORDER=UNFORMATTED MISSING;
CLASS Impact / ORDER=UNFORMATTED MISSING;
TABLE /* Row Dimension */
RISK_ID*
RISK_DESC={LABEL='Risk Description'}*
'likely hood'n*
Impact*(
CONTROL_INST_DESC={LABEL='Control Description'}*
CONTROL_AUTOMATION_TYPE_CD={LABEL='Control Mechanism'}
CONTROL_INST_DESC={LABEL='Control Description'}*
CONTROL_AUTOMATION_TYPE_CD={LABEL='Control Mechanism'}),
/* Column Dimension */
N
DISCOVERY_DT={LABEL=''}*
LOSS_AMT={LABEL='Amount'}*F=COMMA24.*
Sum={LABEL=''} ;
;
RUN;
/* -------------------------------------------------------------------
End of task code.
------------------------------------------------------------------- */
RUN; QUIT;
TITLE; FOOTNOTE;
In attached report I need total of risk id or risk descreption at the end, here in attached report it repeat amount when break control descreption
for example.
N | . | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | ||||||
Amount | Amount | Amount | Amount | Amount | Amount | Amount | |||||||
RISK_ID | Risk Description | likely hood | Impact | Control Description | Control Mechanism | 12 | . | . | 9000000 | . | . | . | . |
RCDA_TDR_RSK_01 | The bank may fail to comply with regulatory requirements and its internal policies while placing term deposit | Low | Low | Procedures relating to Term deposits to be followed at branches are incorporated in the “Habib Bank Procedure and Accounting Manual” of 2014. | MAN | ||||||||
The bank issues various instruction circulars (at regular intervals) to communicate to the staff all latest changes/ amendments in the bank's existing policy and procedures. | AUT |
Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.
The ALL option in the table statement will create summaries at levels of variables. I'm not quite sure exactly what you are looking for because it sounds like you may not be sure yourself.
Here is a short example using SASHELP.CLASS data set.
proc tabulate data=sashelp.class; class sex age; var height; table (sex all) *(age all), height*sum ; run;
I an going to guess that you may want
RISK_ID*
(RISK_DESC={LABEL='Risk Description'} ALL )*
'likely hood'n*
Impact*(<etc>
in the table statement to get a summary at each level of Risk_id.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.