You could also make some small modifications to your proc sql step and then use VBARPARM: proc sql ; create table want as select a.year,a.state,sum(fail)/n as pct "% failed" FORMAT=PERCENT8. from have as a ,(select year,n(fail) as n from have group by year) as b where a.year=b.year group by a.year,state ; quit ; PROC SGPLOT DATA= WANT NOBORDER ; styleattrs datacolors=(darkred darkblue) datacontrastcolors=(black) ; vbarparm category= year response= pct / group= state seglabel seglabelattrs=(color=white weight=bold); run ; This gives you a stacked bar chart with each bar segment labelled with the percentage values from PROC SQL. (Sorry- I'm new to the SAS community and not quite sure how to paste in the resulting graph.)
... View more