Good Morning everyone,
I'm trying to replicate a table structure in SAS as in the example of table structure attached.
I would to know if it is possibile to replicate this structure in SAS and how.
The output expected is the table structure in the example with subtitles, if it possibile.
Thank you for all advice.
I don't open attachments, but replicating an excel table with sas is almost always a question of how much time one has. With the Report Writing Interface you can do anything, but you will have to code it.
I won't open attachments due to security rules in my company. So i don't know if using an output procedure (report, tabulate) can create the table you want.
Your excel file is apparently a report generated from some other applications.
It is indeed possible to produce similar reports using proc tabulate or proc report and combine ods excel destination.
The look and file will largely be identical but may not necessaril be exactly the same.
Don't expect a 1:1 copy of the look, but you can (almost) always create the same logical structure. To give you hints how to do it, we need to have usable source data (SAS dataset, posted as a data step with datalines) and the logic for calculating and/or setting the values in the report.
To get from A to B, one needs to know both A and B.
So for providing examples of code to create the report (B), we need to know the structure of the source data (A); without it, there's nothing to suggest, except "PROC REPORT might do it" or something similar vague.
The Excel spreadsheet you show us is clearly a report, and not a dataset or a database table. If you created it from SAS datasets, you already have everything you need.
Datasets or tables in databases have consistent types for columns and only one set of names for the columns.
In SAS, if you want to store such a report, you store the underlying dataset(s) and the SAS program, so you can recreate the report anytime by rerunning the program.
Thanks @Anto180788 for offering to post the datasets.
However the report is the outcome of a series of steps.
One needs to know the process ( BRD- Business Requirement Document) and the data to write the proper and relevant code.
The following is a good introduction to SAS Proc Report procedure and give a fairly good idea about what can be accomplished http://www.scsug.org/wp-content/uploads/2017/10/An-Introduction-to-PROC-REPORT-SCSUG-2017.pdf
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.