BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
flyingbear
Fluorite | Level 6

Hi,

I'm running SAS 9.4 on Windows.  I'm receiving this notification message when I run the following code.

 

NOTE: Time axis can only support date time values. The axis type will be changed to
LINEAR.

 

data aaa; set bbb;
format date year4.;
pct_diff = (f_&var/f_&var._2017-1)*100;
run;

 

proc sgplot data=aaa noautolegend;
title "Percent Difference: 2018/2017";
band y=pct_diff lower="01oct2017"d upper="30sep2044"d / fillattrs=(color=blue transparency=0.95);
series x=date y=pct_diff / lineattrs=(color=blue thickness=2);
xaxis grid values=("01jan2012"d to "01Jan2020"d by year) display=(nolabel);
yaxis grid label="Percent";
run;

 

The graph is drawn properly since, I think, my data is evenly spaced so linear has no impact.  But it would still be nice to clean up my log file and also to understand what is causing this.

 

Can anyone help?  Thanks in advance,

Jonathan

 

1 ACCEPTED SOLUTION

Accepted Solutions
flyingbear
Fluorite | Level 6

I realized that although the variable DATE was formatted as a year, it was just a numeric variable.  Once I constructed it (using the MDY function) as a SAS date variable the notification message no longer displayed.

View solution in original post

3 REPLIES 3
Reeza
Super User

Try adding interval=Year to your XAXIS statement?

flyingbear
Fluorite | Level 6
Thanks, Reeza. I was being stupid! See below.
flyingbear
Fluorite | Level 6

I realized that although the variable DATE was formatted as a year, it was just a numeric variable.  Once I constructed it (using the MDY function) as a SAS date variable the notification message no longer displayed.

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
  • 3 replies
  • 738 views
  • 0 likes
  • 2 in conversation