BookmarkSubscribeRSS Feed
mauri0623
Quartz | Level 8

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                            
2 REPLIES 2
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
ballardw
Super User

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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 339 views
  • 0 likes
  • 3 in conversation