BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cxkev182
Fluorite | Level 6

Hi,

 

I have the following dataset:

 

data have;
        input Skillset $        Year        Offered        Answered        Abandoned;
        cards;
SKILL1 2014 1116 952 164
SKILL1 2015 1579 977 602
SKILL1 2016 1475 936 539
SKILL2 2014 1422 876 546
SKILL2 2015 1545 810 735
SKILL2 2016 1200 988 212
SKILL3 2014 1332 855 477
SKILL3 2015 1071 836 235
SKILL3 2016 1020 837 183
;
run;

 

Is it possible to create a report in SAS 9.2 with year down the side, skillets going across the top, then within each skill set the a column for offered, answered, abandoned and also a calculated column PCA which is answered/offered as a percentage. 

 

See attachment for desired report.

 

Thanks for any help,

 

cxkev

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

Yes, you can do this kind of crosstab report using PROC REPORT and ACROSS items. This paper http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf  discusses using ACROSS items, absolute column numbers and COMPUTE blocks -- starting on page 9 approximately.

  Here is an example using SASHELP.SHOES with 3 rows (1 for each region) and 2 PRODUCTS shown on report #1, then report #2 code illustrates how the absolute column numbers need to be used for the calculated column.

 

cynthia

show_abs_col.png

 

 

 

 

View solution in original post

4 REPLIES 4
Vish33
Lapis Lazuli | Level 10
can you paste the picture in message itself, I am unable to download it.
Cynthia_sas
SAS Super FREQ

Hi:

Yes, you can do this kind of crosstab report using PROC REPORT and ACROSS items. This paper http://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf  discusses using ACROSS items, absolute column numbers and COMPUTE blocks -- starting on page 9 approximately.

  Here is an example using SASHELP.SHOES with 3 rows (1 for each region) and 2 PRODUCTS shown on report #1, then report #2 code illustrates how the absolute column numbers need to be used for the calculated column.

 

cynthia

show_abs_col.png

 

 

 

 

cxkev182
Fluorite | Level 6
Thank you very much for your help Cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 4 replies
  • 1382 views
  • 1 like
  • 3 in conversation