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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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