BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

This gets you some of the way at least

 

proc freq data=have noprint;
    tables year*Group_Y_Name*Rankle / out=temp outpct;
run;

data graph;
    set temp;
    pct_row=round(pct_row)/100;
run;

title 'Group Y Portfolio (2007 / 2008 / 2009 / 2010)';
proc sgpanel data=graph;
    styleattrs datacolors=(CXFFDAB9 CXADD8E6 CXFAFAD2);
    panelby Group_Y_Name / layout=columnlattice novarname noborder colheaderpos=bottom;
    vbar Year / response=pct_row group=Rankle stat=sum seglabel seglabelformat=percent.;
    colaxis display=(nolabel);
    rowaxis display=(nolabel);
    keylegend / noborder title='';
run;
title;

 

View solution in original post

8 REPLIES 8
PeterClemmensen
Tourmaline | Level 20

@Rajeshthangam Hi and welcome to the SAS Community 🙂

 

What version of SAS are you in?

Rajeshthangam
Calcite | Level 5
I am using SAS University edition..
PeterClemmensen
Tourmaline | Level 20

This gets you some of the way at least

 

proc freq data=have noprint;
    tables year*Group_Y_Name*Rankle / out=temp outpct;
run;

data graph;
    set temp;
    pct_row=round(pct_row)/100;
run;

title 'Group Y Portfolio (2007 / 2008 / 2009 / 2010)';
proc sgpanel data=graph;
    styleattrs datacolors=(CXFFDAB9 CXADD8E6 CXFAFAD2);
    panelby Group_Y_Name / layout=columnlattice novarname noborder colheaderpos=bottom;
    vbar Year / response=pct_row group=Rankle stat=sum seglabel seglabelformat=percent.;
    colaxis display=(nolabel);
    rowaxis display=(nolabel);
    keylegend / noborder title='';
run;
title;

 

Rajeshthangam
Calcite | Level 5

It works fine. Thank you so much.

Is there anyway to acheive the same results in GCHART?

 

PeterClemmensen
Tourmaline | Level 20

You're welcome 🙂 Probably. I'm no expert in PROC GCHART. Also, the SG Procedures are newer and better documented.

ballardw
Super User

@Rajeshthangam wrote:

It works fine. Thank you so much.

Is there anyway to acheive the same results in GCHART?

 


No. SAS University Edition does not include the SAS/Graph part that would be needed to use the much less capable GCHART.

Rajeshthangam
Calcite | Level 5

Thank you so much for giving this logic. But, Can you please remove the sample data and expected output image given?

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1160 views
  • 0 likes
  • 3 in conversation