Hi, I'm trying to run double Y-axis line graph but It says that the Y variables don't exist....
Here's what I got:
proc sort data = dataname; by Month Hour; run; proc summary data = dataname; by Month Hour; var Load Temperature; output out = means (drop = _:) mean = mean n = n stderr = stderr; run; proc sgplot data=means; where Month in (1); series x=hour y=Load; series x=hour y=Temperature / y2axis; run;
Please include the full log.
@matt23 wrote:
Hi, I'm trying to run double Y-axis line graph but It says that the Y variables don't exist....
Here's what I got:
proc sort data = dataname; by Month Hour; run; proc summary data = dataname; by Month Hour; var Load Temperature; output out = means (drop = _:) mean = mean n = n stderr = stderr; run; proc sgplot data=means; where Month in (1); series x=hour y=Load; series x=hour y=Temperature / y2axis; run;
Do a PROC CONTENTS of the "means" data set coming our of PROC SUMMARY, and see if it contains the expected variables.
proc contents data=means; run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.