I am creating 2 vbars for actual and predicted sales using proc sgplot, I have the code and able to get perfect graph but it uses common y-axis.
I want different y-axis for actual and predicted.
Thanks for all your help.
set sashelp.prdsal2 (keep= monyr actual predict year);
where year eq 1995;
proc summary data=test missing nway;
var actual predict;
output out=summary (drop= _type_ _freq_ ) sum=;
proc sgplot data=summary;
vbar monyr / response=actual
legendlabel="Actual Sales" name="Actual";
Currently, you cannot assign bar charts to secondary axes. However, you may be able to work around this depending on what you're trying to achieve. Why are you trying to asign the "predict" response to the Y2 axis? Is it just for axis labeling?