So I'm trying to make individual reports for each state that includes all the institutions in that state. I want it to include the total applications and then the number of applications by each race and in parentheses next to it the percent of applications for that race. I'm super confused on how to split the report by state though and then put the percent in parentheses next to the number for each race. Right now I have one big data set for all the states and universities. I'll attach what the data set looks like and an example of what I want the table to look like. Is this proc report?
MICHIGAN
Undergraduate Institute | Black or African American | Hispanic, Latino, or Hispanic Origin | Asian | American Indian or Laska Native | White | Non-white | Total Applicants |
Michigan State University | 20 (15.38%) | 20 (15.38%) | 20 (15.38%) | 20 (15.38%) | 50 (38.46 %) | 80 (61.54%) | 130 |
|
|
|
|
|
|
|
|
A construct such as "20 (15.38%)" is not easy to produce in PROC REPORT, however if the 20 is in one column and the 15.38% is in another column, then your task becomes much easier.
They are already calculated and in separate columns I just wasn't sure how to combine them like that.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.