Some versions of SAS Visual Analytics support adding graphs to crosstabs, but there is no version that does exactly what you are asking. Which version are you using?
Four tips to remember when you contact SAS Technical Support
Creating Beautiful Reports
SAS Visual Analytics Learning Center
@acordes, yes you can do that. Here is an example of SAS Job that leverages sgplot:
And if you combine it with some of the articles I wrote about SAS Jobs integrated with data-driven content, you should be able to make it work:
It's weird. I'd like to use the img src tag option like it's recommended in the link you shared but I don't have a clue what to put for the host:port part.
When I create a job in job execution and connect to the caslibs I use a command line
options cashost="xxxxxx.xxxx.es" casport=xxxx and it works, but these don't work here.
My final goal is to call the job from the VA report using a web content object and let the job open the form and execute the sas code for the graph.
With the form I allow for some user input and in my understanding in the same window of the form I should be able to leverage the graph I draw with SG Plot.
So I want to have a form plus graph within the report.
But as I said I'm struggling to get it working.
We're upgrading to 3.5 in the next weeks. In my understanding at least I can use the common task model language which will come in handy for populating dynamic list boxes based on the data.
I have managed to achieve more or less what I wanted to do.
The form displays in VA and once the run button is pressed the form disappears and the graph draws having applied correctly the parameter supported filter. I have achieved this by suppressing the _target="tab" option in the html code.
What is still missing is to have a button that brings back the form again because the graph persists. When I draw whatever object on the report pane then the web content refreshes and the form is shown again. How can I include a going back button in the job code part?
<!DOCTYPE html> <html lang="en"> <head> <title>Return SGPLOT Image Output</title> <link rel="stylesheet" href="/SASJobExecution/theme"> </head> <body role="main" class="jobexec_body"> <form class="jobexec_form" action="/SASJobExecution/" > <input type="hidden" name="_program" value="/Public/renato/labor/test2"/> <input type="hidden" name="_action" value="execute"/> <div class="jobexec_sample_header">SAS<sup>®</sup> Job Execution</div> <h1 class="jobexec_sample_name">Return SGPLOT Image Output</h1> <p> The SGPLOT procedure creates a bar chart using the SASHELP.CLASS table, and returns the binary image data to the client. </p> <label for="age_min">Output format:</label> <select name="age_min" id="age_min" class="jobexec_sample_select"> <option value="12">twelve</option> <option value="13">thirteen</option> <option value="14">fourteen</option> </select> <br/> <br/> <label for="_odsstyle">ODS style:</label> <select name="_odsstyle" id="_odsstyle" class="jobexec_sample_select"> [More values here] <option value="HTMLBlue" selected>HTMLBlue</option> [More values here] </select> <br/> <br/> <hr/> <input type="submit" value="Run code" class="jobexec_sample_input_submit"/> <input type="checkbox" name="_debug" id="_debug" value="log" class="jobexec_sample_input_checkbox"/> <label for="_debug">Show SAS Log</label> </form> </body> </html> * Declare input parameters; %global _ODSSTYLE age_min; ods graphics / imagemap; proc sgplot data=sashelp.class; where age gt &age_min; hbar age / tip=(AGE) ; run; quit;
You cannot have a back button in the prompt framework. To reload the prompt interface, you can hit Alt+Left Arrow twice - it is like the browser back button.
If you really want a back button, you need to use an HTML form for you parameters.
This functionality is not currently available but it is something we are interested in as a possible future addition.
Currently, the best way to indicate change would be to make a display rule as follows:
1. Create a "Difference from previous period" calculation by right-clicking a measure on the Data pane and selecting "New Calculation" :
2. Create your table. Add the measure and the date column. Add the "Difference from previous period" calculation to the Hidden role if you don't want to show it, or add it to the Columns role if you do.
3. Create a display rule on the Rules pane that is based on the "Difference from previous period" calculation and colors the measure values according to whether the value is less than 0
Set the Placement option to be the original measure rather than the calculated measure.
Your result should look like this:
Where the value is less than the previous value, it is colored by the display rule. You can repeat these steps for additional measures as needed.
A limitation of this approach is that you MUST include the date column in your table.
I hope this helps,
You can work around it for List tables (no crosstabs, unfortunately):
The Good/Bad column is a character calculated item defined as below:
The arrows (and other symbols) can be obtained from an unicode table. For this example, I've used:
What's nice about the links above is that you can simply find what you want, use the copy button, and paste the symbol in the VA expression.
Then all you need to do is define a display rule similar to the formula used in the expression to assign the color, as seen in the first screenshot.
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.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.