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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2053 views
  • 1 like
  • 3 in conversation