BookmarkSubscribeRSS Feed
ANIRBAN2
Fluorite | Level 6

ANIRBAN2_0-1666021836918.png

1.The above picture show the datasets from here I need to create a report in excel where anything above B.cashoutflow will sum into A. cashinflow.

2.Anything above C.mismatch and below B.cashoutflow will sum into B.cashoutflow.

3.C.mismatch=Inflow=Outflow

The excel report i could generate is attached below.

 

Please ask if any ques.

 

I am also attaching the proc report codes

ods excel file="/home/u60099960/ALM_DER_REPORT/report_format.xlsx"
options (sheet_name="M_A1" embedded_titles="yes" embedded_footnotes='yes' sheet_interval="none");

ods escapechar="^";

title1 UNDERLIN=0 j=center height=10pt bold font="Arial Rounded MT Bold" color=black "A.1 Contractual Maturity Mismatch"
j=right color=black height=10pt font="Arial Rounded MT Bold" bold "SR 000's";
proc report data=post_trans2
style(report)=[ bordercolor=black borderwidth=2 cellspacing=0 bordertopwidth=1px
bordertopstyle=solid bordertopcolor=#000000 borderleftwidth=0px bordertopstyle=solid borderrightwidth=1px borderrightcolor=#000000
borderrightstyle=solid borderbottomwidth=1px borderbottomcolor=#000000 borderbottomstyle=solid]
style (column) =[foreground=black background=white vjust=bottom font_size=10pt bordertopwidth=1px
bordertopstyle=solid bordertopcolor=#000000 borderleftwidth=0px bordertopstyle=solid borderrightwidth=1px borderrightcolor=#000000
borderrightstyle=solid borderbottomwidth=1px borderbottomcolor=#000000 borderbottomstyle=solid]
style (header) =[foreground=black background=lightskyblue vjust=bottom font_size=10pt font_weight=bold
bordertopwidth=1px bordertopstyle=solid bordertopcolor=#000000 borderleftwidth=0px bordertopstyle=solid borderrightwidth=1px borderrightcolor=#000000
borderrightstyle=solid borderbottomwidth=1px borderbottomcolor=#000000 borderbottomstyle=solid];

column level_02_desc
("BUCKET"(("DAY"(D01)) ("MONTH" (M2 M6 M9)) ("YEAR"(Y1 Y2 Y3 Y5 "Y5+"n)))) ;
define level_02_desc/ display "Select description for Drop Down provided below OR input Required Description. ";
define D01/display "1" analysis;
define M2 /display "2" analysis;
define M6 /display "6" analysis;
define M9/ display "9" analysis;
define Y1 /display "1" analysis;
define Y2/ display "2" analysis;
define Y3 /display "3" analysis;
define Y5/ display "5" analysis;
define "Y5+"n/ display "> 5" analysis;
define sr/group;

Run;
ods excel close;

 

2 REPLIES 2
acordes
Rhodochrosite | Level 12

You need to provide data in an useable and secure format. 

And in rectangular format because what you share is the desired report alike outcome. 

Beware of sharing excel files. many helping hands here won't open it. 

When working with proc report you come from a rectangular data format and you can shape it according to your needs. 

and use the code window for posting code. 

PaigeMiller
Diamond | Level 26

Please share your data as SAS data step code, and not in any other format. You can use this macro to create such code from your SAS data set. Agreeing with @acordes , most of us will not download or try to use Excel files.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 367 views
  • 0 likes
  • 3 in conversation