I think the easiest way to handle this case is to combine the two variables into a SAS date variable and use that variable in SGPLOT. Here is a simple example:
format newdate monyy.;
do year=2000 to 2002;
do month=1 to 12;
newdate = mdy(month,01,year);
proc sgplot data=datedata;
scatter x=newdate y=y;
Your data must contain at least several years worth the information. The system determined that the best format for your time axis was years. You can force it to months by adding this statement to your SGPLOT code;
Hope this helps!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.