BookmarkSubscribeRSS Feed
rehman_panjwani
Calcite | Level 5
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
1 REPLY 1
ballardw
Super User

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.

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 652 views
  • 0 likes
  • 2 in conversation