I have this table that I can get using proc summary. The problem is that the result of the proc summary does not exactly look like the table and it needs to be minuplated more to make it look like the table. Is there a way to do it using SQL prehaps?
R1a. Number of Line Items With Select Procedure Codes, FY 2014 -2023 | |||||||||||||||
Fiscal Year | Procedure Code | Total Line Items | |||||||||||||
Q4145 | Q4155 | Q4162 | Q4171 | Q4174 | Q4177 | Q4185 | Q4192 | Q4213 | Q4215 | Q4231 | Q4244 | Q4246 | |||
2014* | |||||||||||||||
2015 | |||||||||||||||
2016 | |||||||||||||||
2017 | |||||||||||||||
2018 | |||||||||||||||
2019 | |||||||||||||||
2020 | |||||||||||||||
2021 | |||||||||||||||
2022 | |||||||||||||||
2023* | |||||||||||||||
Total Line Items |
Hello, @mauri0623 we will do our best to help you, but you have to help us. Your subject line should briefly describe the problem. "Please help" does not describe the problem. Please go back to your ORIGINAL post and modify the subject line. EDIT: I see LinusH has modified it for you, however please provide meaningful subject lines from now on.
The problem is that the result of the proc summary does not exactly look like the table and it needs to be minuplated more to make it look like the table. Is there a way to do it using SQL prehaps?
We do not know what the PROC SUMMARY table looks like, so we would need to see this in order to know what changes need to be made. Please show us a screen capture of the PROC SUMMARY table. Use the "Insert Photos" icon to include your screen capture and do not attach files.
It does not sound to me like PROC SQL would be useful here. PROC SQL is not, in my mind, a tool for creating tables.
Example of the data before the Proc Summary, in the form of a data step that will create the correct variables.
The code used in proc summary.
Do you really expect a data set? That output looks more like a report and I really consider placing anything resembling summary data, your "total lines items", inside a data set as it is too easy to use that total accidentally in other procedures.
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.