BookmarkSubscribeRSS Feed
Calcite | Level 5

Can we implement arrow symbol in list table or crosstab for the numeric value(Increment/Decrement)




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? 

Rhodochrosite | Level 12

Is it possible with the help of job execution and data-driven-content to display sgplot generated graphs inside the VA report?

Calling @Renato_sas as well...

SAS Employee

@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:

Tag: "VA-DDC-Jobs Integration" in "SAS Communities Library" - SAS Support Communities




Rhodochrosite | Level 12

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="" 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.




In newer versions of VA, we have a Job Content object that automatically displays the output of a job. This might be ideal for you if you can upgrade to a recent Viya 4 release.
Rhodochrosite | Level 12

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">

<title>Return SGPLOT Image Output</title>
<link rel="stylesheet" href="/SASJobExecution/theme">

<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>

The SGPLOT procedure creates a bar chart using the SASHELP.CLASS
table, and returns the binary image data to the client.

<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>


<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]



<input type="submit" value="Run code" class="jobexec_sample_input_submit"/>
<input type="checkbox" name="_debug" id="_debug" value="log" 
<label for="_debug">Show SAS Log</label>




*  Declare input parameters;

%global _ODSSTYLE

ods graphics / imagemap;

proc sgplot data=sashelp.class; 
where age gt &age_min;
hbar age / tip=(AGE) ; 

sgplot within va.png


SAS Employee

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.

SAS Employee

@acordes, I'm assuming you are talking about this url: http://host:port/SASJobExecution


This is the URL to your Viya applications, normally same host and port that you use for Visual Analytics.


Hello Rajesh,


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" :change3.gif


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,


SAS Employee

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:

🠕 - Upwards Arrow with Equilateral Arrowhead: U+1F815 - Unicode Character Table (

🠗 - Downwards Arrow with Equilateral Arrowhead: U+1F817 - Unicode Character Table (


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.




Great workaround!



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. 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 11 replies
  • 5 in conversation