BookmarkSubscribeRSS Feed
matt23
Quartz | Level 8

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;
2 REPLIES 2
Reeza
Super User

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;

 

DanH_sas
SAS Super FREQ

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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 655 views
  • 0 likes
  • 3 in conversation