BookmarkSubscribeRSS Feed
CLE
Obsidian | Level 7 CLE
Obsidian | Level 7

I'd like for the sgplot to have drill downs on the markers instead of in a separate proc report.  I need to be able to pass the existing prompts then the value from the line marker value to the sub-stored process prompt.  Anyone know how or have advice on how to do it? I only know how in a proc report.  I'm using EG 7.1 with M4. 

 

Thanks in advance. 

ExampleforSAS10312018.png

4 REPLIES 4
pink_poodle
Barite | Level 11

Yes, I found an example where proc gchart generates a graph and a table using a stored process:

 

http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/stpsamp.html

 

*ProcessBody;
   %STPBEGIN;
      title 'Age analysis by sex';
      footnote;
      proc sort data=sashelp.class out=class; by sex age; run;
      proc gchart data=class;
         vbar3d age / group=sex
            discrete
            nozero
            shape=cylinder
            patternid=group;
      run; quit;
      title;
      proc print data=class;
         by sex age;
         id sex age;
         var name height weight;
      run;
   %STPEND;
CLE
Obsidian | Level 7 CLE
Obsidian | Level 7

I'm needing it to be only the month that is clicked on that would be displayed. Example: They click on the May18 marker and a May18 secondary stored process sgplot is created. 

pink_poodle
Barite | Level 11

Ok, you would need to collect user input and store it in a macro variable like this:

 

*ProcessBody;
   %stpbegin;

   title "Product Sales for &MONTH, &YEAR";
   proc print data=sales;
      where Month eq "&MONTH" and Year eq &YEAR;
      var productid product sales salesgoal;
   run;

   %stpend;

Reference

 

SAS Stored Processes: Input Parameters

ballardw
Super User

Both SERIES and SCATTER plots in SGPLOT support the URL= option. The option would reference a character variable in the data set that contains the URL of what you want to display when selected.

 

How to link that URL to the display you want likely means that the target has to have been created or the page knows how to create something. I suspect the URL could contain parameters as any URL may but the values would have to be calculated and added to the URL variable.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1230 views
  • 0 likes
  • 3 in conversation