title "Gender Distribution of Company A"; proc sgplot data = baseline; vbar Sex__Male_1_ /response=percent datalabel ; format Sex__Male_1_ sex.; run;
response = percent not working the log shows:
35 ods trace on; 136 title "Gender Distribution of Company A"; 137 proc sgplot data = baseline; 138 vbar Sex__Male_1_ /response=percent datalabel ; ERROR: Variable PERCENT not found. 139 format Sex__Male_1_ sex.; 140 run;
Need help to transform the yaxis into percent format
RESPONSE= requires a variable in the data set.
STAT=percent specifies the statistic used for the Yaxis
So perhaps you are looking for something like:
proc sgplot data=sashelp.class; vbar age / stat=percent; run;
where each bar at the Age value represents the percentage of the number of records?
RESPONSE= requires a variable in the data set.
STAT=percent specifies the statistic used for the Yaxis
So perhaps you are looking for something like:
proc sgplot data=sashelp.class; vbar age / stat=percent; run;
where each bar at the Age value represents the percentage of the number of records?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: