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;
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.
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.