Desktop productivity for business analysts and programmers

TABULATE REPORT OF RISK AND CONTROL

Reply
Occasional Contributor
Posts: 8

TABULATE REPORT OF RISK AND CONTROL

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.201120122013201420152016
AmountAmountAmountAmountAmountAmountAmount
RISK_IDRisk Descriptionlikely hoodImpactControl DescriptionControl Mechanism12..9000000....
RCDA_TDR_RSK_01The bank may fail to comply with regulatory requirements and its internal policies while placing term depositLowLowProcedures 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
Super User
Posts: 11,107

Re: TABULATE REPORT OF RISK AND CONTROL

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.

Ask a Question
Discussion stats
  • 1 reply
  • 140 views
  • 0 likes
  • 2 in conversation