SAS Visual Analytics

5月 112021

It’s safe to say that SAS Global Forum is a conference designed for users, by users. As your conference chair, I am excited by this year’s top-notch user sessions. More than 150 sessions are available, many by SAS users just like you. Wherever you work or whatever you do, you’ll find sessions relevant to your industry or job role. New to SAS? Been using SAS forever and want to learn something new? Managing SAS users? We have you covered. Search for sessions by industry or topic, then add those sessions to your agenda and personal calendar.

Creating a customizable agenda and experience

Besides two full days of amazing sessions, networking opportunities and more, many user sessions will be available on the SAS Users YouTube channel on May 20, 2021 at 10:00am ET. After you register, build your agenda and attend the sessions that most interest you when the conference begins. Once you’ve viewed a session, you can chat with the presenter. Don’t know where to start? Sample agendas are available in the Help Desk.

For the first time, proceedings will live on SAS Support Communities. Presenters have been busy adding their papers to the community. Everything is there, including full paper content, video presentations, and code on GitHub. It all premiers on “Day 3” of the conference, May 20. Have a question about the paper or code? You’ll be able to post a question on the community and ask the presenter.

Want training or help with your code?

Code Doctors are back this year. Check out the agenda for the specific times they’re available and make your appointment, so you’ll be sure to catch them and get their diagnosis of code errors. If you’re looking for training, you’ll be quite happy. Training is also back this year and it’s free! SAS instructor-led demos will be available on May 20, along with the user presentations on the SAS Users YouTube channel.

Chat with attendees and SAS

It is hard to replicate the buzz of a live conference, but we’ve tried our best to make you feel like you’re walking the conference floor. And we know networking is always an important component to any conference. We’ve made it possible for you to network with colleagues and SAS employees. Simply make your profile visible (by clicking on your photo) to connect with others, and you can schedule a meeting right from the attendee page. That’s almost easier than tracking down someone during the in-person event.

We know the exhibit hall is also a big draw for many attendees. This year’s Innovation Hub (formerly known as The Quad) has industry-focused booths and technology booths, where you can interact in real-time with SAS experts. There will also be a SAS Lounge where you can learn more about various SAS services and platforms such as SAS Support Communities and SAS Analytics Explorers.

Get started now

I’ve highlighted a lot in this blog post, but I encourage you to view this 7-minute Innovation Hub video. It goes in depth on the Hub and all its features.

This year there is no reason not to register for SAS Global Forum…and attend as few or as many sessions as you want. Why? Because the conference is FREE!

Where else can you get such quality SAS content and learning opportunities? Nowhere, which is why I encourage you to register today. See you soon!

SAS Global Forum: Your experience, your way was published on SAS Users.

4月 292021

Ever heard of Mandelbrot set? I learned about it recently from an article introducing a book translated from the ‘Le Grand Roman des Maths’ by Mickaël Launay. I was impressed and thought I would see if I could draw one in SAS Visual Analytics.

Here are the seven steps I took:

1. Generate the data set

The first problem is where to get the data set. SAS documentation provides  this sample using DS2 and HPDS2 to generate the data set. I changed the code to make it run with SAS data step. When I run my code in SAS Studio, and the PROC GCONTOUR renders the graph shown below.

2. Assign data to numeric series plot

Now I get the generated Mandelbrot data set, which has about 360K rows and three numeric columns: p, q and mesh. Now it’s ready to upload the Mandelbrot dataset in SAS Visual Analytics – and I’m ready to start my drawing 😊.

I am going to use a numeric series plot to draw the graph. Realizing that the system data limitation for numeric series plot is 3,000, I need to override it by checking the ‘Options’ -> ‘Object’ -> ‘Override system data limit’. I reset it to 500,000 based on my VA server capacity. (This value should be adjusted based on your VA environment capability.)

Now assign the p to ‘X axis’, the q to ‘Y axis’, the mesh to ‘Group’ (be sure to change the classification of mesh to ‘Category’), and happily wait for the rendering of the graph.

Unfortunately, I got the message: ‘No data appears because too many values were returned from the query. Filter your data to reduce the number of values.’

3. Filter the data

So I must compromise to break the data into several parts with filters, and then use Precision layout to put them together.

I am using the q value to create the filter. Try a couple of times and something like “( 'q'n BetweenInclusive(-1.5, -0.9) ) OR ( 'q'n Missing )” works for me. Thus, I decide to break the whole data set into five parts for the span of the q (from -1.5 to 1.5) and draw each part in one numeric series plot.

 4. Use Precision layout

To put together all the parts with the filtered data in each numeric series plot, I need to have the Precision Container to hold all five plots. To put them together nicely, I need to adjust the options for the numeric series plots.

An easy way is to set for one and duplicate for others. Here are option settings I am using:

  • In ‘Object’ -> ‘Title’, set to ‘No title’;
  • Check the ‘Style’ -> ‘Padding’, and set the value to 0;
  • Uncheck the ‘Graph Frame’ -> ‘Grid lines’;
  • In ‘Series’ -> ‘Line thickness’: set to 1;
  • In ‘Series’ -> ‘Markers’ -> ‘Marker size’: set to 3;
  • Uncheck ‘X Axis Options -> ‘Axis label’, and uncheck ‘Tick values’;
  • Uncheck ‘Y Axis Options -> ‘Axis label’, and uncheck ‘Tick values’;
  • In ‘Legend’ -> ‘Visibility’, choose ‘Off’.

5. Duplicate and set layout for the five numeric series plots

Now, I have one numeric series plot that has options set up as described, and one filter on the q.

Next is to duplicate the numeric series plot four times and change the filter for each. What I want, is to have the five numeric series plots add up to the whole span of the q (from 1.5 to -1.5), from up to bottom.

For each of the numeric series plot, set the value in its ‘Options’ -> ‘Layout’ section as following. The Filter column is indicating the filter range of the q.

Filter for q Left Top Width Height
0.9 ~ 1.5 0% 0% 100% 20%
0.3 ~ 0.9 0% 18% 100% 20%
-0.3 ~ 0.3 0% 36% 100% 20%
-0.9 ~ -0.3 0% 54% 100% 20%
-1.5 ~ -0.9 0% 72% 100% 20%


6. Set Display Rules

With above steps, now the graph is rendered using the default colors in VA.

But I like the colors used by the codes, I want to change them using display rule. In the Display Rules tab, create a display rule with the mesh. And add each mesh value with the wanted color.

For example, if the mesh value is 3, look up the GOPTIONS segment in the codes and note that it uses the ‘CX003366’ color value. In SAS Visual Analytics, go to the Custom color tab of creating display rule. For the mesh value 3, enter ‘003366’ in the ‘Hex value’ box.

Of course, I need some patience to get all the mesh values colored with display rules.

7. Render the Mandelbrot set

And now, I have drawn the Mandelbrot set in SAS Visual Analytics. I also put a Text Object (‘Mandelbrot set’) below the graph to show what is graphing.

How do you like it? Just give it a try and have fun!

To learn more about Mandelbrot sets in SAS, read these posts by my Cary-based colleagues:


How to draw a Mandelbrot set in SAS Visual Analytics was published on SAS Users.

4月 202021

I can’t believe it’s true, but SAS Global Forum is just over a month away. I have some exciting news to share with you, so let’s start with the theme for this year:

New Day. New Answers. Inspired by Curiosity.

What a fitting theme for this year! Technology continues to evolve, so each new day is a chance to seek new answers to what can sometimes feel like impossible challenges. Our curiosity as humans drives us to seek out better ways to do things. And I hope your curiosity will drive you to register for this year’s SAS Global Forum.

We are excited to offer a global event across three regions. If you’re in the Americas, the conference is May 18-20. In Asia Pacific? Then we’ll see you May 19-20. And we didn’t forget about Europe. Your dates are May 25-26. We hope these region-specific dates and the virtual nature of the conference means more SAS users than ever will join us for an inspiring event. Curious about the exciting agenda? It’s all on the website, so check it out.

Keynotes speakers that you’ll talk about for months to come

Want to be inspired to chase your “impossible” dreams? Or hear more about the future of AI? How about learning about work-life balance and your mental health? We have you covered. SAS executives are gearing up to host an exciting lineup of extremely smart, engaging and thought-provoking keynote speakers like Adam Grant, Ayesha Khanna and Hakeem Oluseyi.

And who knows, we might have a few more surprises up our sleeve. You’ll just have to register and attend to find out.

Papers and proceedings: simplified and easy to find

Have you joined the SAS Global Forum online community? You should, because that’s where you’ll find all the discussion around the conference…before, during and after. It’s also where you’ll find a link to the 2021 proceedings, when they become available. Authors are busy preparing their presentations now and they are hard at work staging their proceedings in the community. Join the community so you can connect with other attendees and know when the proceedings become available.

Stay tuned for even more details

SAS Global Forum is the place where creativity meets curiosity, and amazing analytics happens! I encourage you to regularly check the conference website, as we’re continually adding new sessions and events. You don’t want to miss this year’s conference, so don’t forget to register for SAS Global Forum. See you soon!

Registration is open for a truly inspiring SAS Global Forum 2021 was published on SAS Users.

3月 252021

Readers of my earlier post Discover Visual Analytics Report Paths with REST APIs asked for ways to export SAS Visual Analytics (VA) report content programmatically. I know this is a topic of interest from many VA report designers. So, I think it’s better to write something on this and I hope this post can be of help for such requirements.

We all know SAS Visual Analytics provides ability to export reports to PDF in the product GUI. In addition, the REST API for visualization also provides APIs to save the entire report or report objects to SVG image. In this article, I will use the SAS VA SDK to export VA reports to a PDF file. Note: this task requires some basic knowledge with JavaScript programming; good thing is, it’s not that complicated.

The SAS VA SDK provides a set of components and APIs that enable you to render anything from the entire report down to individual report parts. I am going to show how to export VA report content to a PDF document.

The VA SDK requires several prerequisites be set up in SAS Viya. These steps are covered in the documentation and I’ll not detail them here. For reference, these may include enabling CORS, CSRF, HTTPS and Cross-site cookies. Also, the VA SDK provides options to connect to SAS Viya using 'credentials' or 'guest' authentication. If you want to have the report accessible by the 'guest' user, it needs the

<script async src=""></script>

*Note: I am using va-report-components@latest above to invoke the latest available version of SDK library. You may also indicate a specific version, such as @0.14.0 for version 0.14.0 of the SDK library.

Get the VA report URI

If you are not familiar with how to get the reportUri, refer to the 'Get the ReportURI' section in the Using REST API to transform a Visual Analytics Report post. In this example I received the following response to my API call: reportUri=/reports/reports/cbf97b0a-457d-4b4f-8913-547e0cdf390c.

Display the VA report in the web page

This can be done by embedding an HTML custom tag in the section of your web page. The VA SDK supports three types of HTML custom tags: the entire report, a report page, or individual report objects. Each type is introduced below.

  1. <sas-report>
  2. In the sample code below, the URL represents the SAS Viya server, the authenticationType is 'guest' or 'credentials', and the reportUri identifies the report to render.

  3. <sas-report-page>
  4. In the sample code below, the URL represents the SAS Viya server, the authenticationType is ‘guest’ or ‘credentials’, the reportUri identifies the report, and the pageName indicates which page within the report to render. You can use and actual page number or use pageIndex="0" which refers to the first page in the report. You can get the tag in SAS Visual Analytics, by clicking the 'Copy link…' menu item from the context menu of the page, choosing the 'Embeddable web component' option and clicking the 'Copy Link' button.

  5. <sas-report-object>
  6. In the sample code below, the URL represents the SAS Viya server, the authenticationType is 'guest' or 'credentials', the reportUri identifies the report, and the objectName gives the name of the object in VA report to render. You can get the tag in SAS Visual Analytics, by clicking the 'Copy link…' menu item from the context menu of any an object, choosing the 'Embeddable web component' option and clicking the 'Copy Link' button.


Make a function to export PDF

Remember when I said you’d need a little JavaScript knowledge? Well, the time is now. Follow the steps below to create a function in JavaScript which exports the report, page or object to a PDF file.

  1. Load the global vaReportComponents from SDK library. This is done by the window.addEventListener('vaReportComponents.loaded', function()) function.
  2. Next, get the report handle by calling the getReportHandle method on an object given by one type of three custom HTML tags. Something like myReport.getReportHandle(), myReportPage.getReportHandle(), or myReportObject.getReportHandle().
  3. Invoke the reportHandle.exportPDF(options) function to export the PDF. The options give the customized properties of the exported report. If no option is specified, the default value for the options is used. For example, the options can have the 'includeCoverPage: false' which means the exported PDF will not generate the cover page for the report. There are multiple options for the exportPDF function, please refer the VA SDK document for more info and its usage.

Put all together

Below are the snippets to generate the PDF document for a report page, using the options of no cover page and no appendix.

  1. I put a button in the HTML page, so I can click the button to trigger the export PDF function.
  2. The page displays the report page I am going to export. I’ve added id="sasReportPage" in the sas-report-page html tag, so I can get the DOM element by its ID quickly using the document.getElementById("sasReportPage") method.
  3. <html>
    <head> <meta http-equiv="content-Type" content="text/html"> 
    <script async src=""></script>
    <div id="buttons"> Export the PDF document of the VA report page by clicking the 
    <button type="button" class="btn_load" id ="PrintBtn" onclick="PrintPDF()"> EXPORT PDF </button> button. </div>
    <div >
            <sas-report-page id="sasReportPage"
                reportUri="/reports/reports/cbf97b0a-457d-4b4f-8913-547e0cdf390c" pageIndex=0>
        function PrintPDF() {
    		// load the global variable of vaReportComponents
                document.addEventListener('vaReportComponents.loaded', function(){});
                const myReport = document.getElementById("sasReportPage");
    		// get the report page handle
            myReport.getReportHandle().then((reportHandle) => {
    	  	    // set options – not include cover page and appendix of the report
    const options = {
                          includeCoverPage: false,
                          includeAppendix: false,
                   includedReportObjects: ["vi6"],
    	   	    // call the exportPDF function to export PDF document
                reportHandle.exportPDF(options).then((pdfUrl) => {
                          // Open the exported PDF in a new window
            , '_blank');
  4. Save the code above as an html page, so I can access it from a web server. For example, save to my localhost/myproj/mysdk.html. When I load the page successfully, it shows the VA report page embedded in my html page as below:
  5. VA report page embedded in my html page

  6. Now, clicking the 'EXPORT PDF' button, opens a new page with exported PDF document like below:
  7. Exported PDF document


In this post, we’ve learned how to use the SAS VA SDK to call reports, display them in a web page and export them to a PDF file. In the sample snippets, I used the sas-report-page html tag to export one page of a VA report. Change the html tag to sas-report accordingly, and you can easily export the whole VA report, or change it to sas-report-object to export an object in the VA report.

Programmatically export Visual Analytics a report to PDF was published on SAS Users.

3月 242021

In one of my prior posts, I discussed the power behind a Hidden Data Role in SAS Visual Analytics. In this post, I provide a summary of places you can go to learn more about other enhancements to the List Table.

The List Table can be more than just a black-and-white ledger style visual. Here is one example where I’ve highlighted some of the enhancements you can apply to the List Table:

List Table Example 1

You can also control the styling of the List Table by changing the header and total cell background colors as well as an alternating row color:

If you want to style your List Table for all users to have the same color scheme and other style enhancements, consider using either a Report Theme or Object Templates for consistency across report developers.

Want to learn more? The SAS Communities version of this article provides examples of:

  • Display Rules: Color-Mapped, Expression or Gauge
  • Abbreviated value
  • Sparkline
  • Totals
  • Freeze Columns to the left

You can also learn more about Cell Graphs by reading the article, Use SAS Visual Analytics 8.3 Cell Graphs to enhance List Tables and Crosstabs, or by checking out this video:

Get to know the List Table was published on SAS Users.

2月 252021

The people, the energy, the quality of the content, the demos, the networking opportunities…whew, all of these things combine to make SAS Global Forum great every year. And that is no exception this year.

Preparations are in full swing for an unforgettable conference. I hope you’ve seen the notifications that we set the date, actually multiple dates around the world so that you can enjoy the content in your region and in your time zone. No one needs to set their alarm for 1:00am to attend the conference!

Go ahead and save the date(s)…you don’t want to miss this event!

Content, content, content

We are working hard to replicate the energy and excitement of a live conference in the virtual world. But we know content is king, so we have some amazing speakers and content lined up to make the conference relevant for you. There will be more than 150 breakout sessions for business leaders and SAS users, plus the demos will allow you to see firsthand the innovative solutions from SAS, and the people who make them. I, for one, am looking forward to attending live sessions that will allow attendees the opportunity to ask presenters questions and have them respond in real time.

Our keynote speakers, while still under wraps for now, will have you on the edge of your seats (or couches…no judgement here!).

Networking and entertainment

You read that correctly. We will have live entertainment that'll have you glued to the screen. And you’ll be able to network with SAS experts and peers alike. But you don’t have to wait until the conference begins to network, the SAS Global Forum virtual community is up and running. Join the group to start engaging with other attendees, and maybe take a guess or two at who the live entertainment might be.

A big thank you

We are working hard to bring you the best conference possible, but this isn’t a one-woman show. It takes a team, so I would like to introduce and thank the conference teams for 2021. The Content Advisory Team ensures the Users Program sessions meet the needs of our diverse global audience. The Content Delivery Team ensures that conference presenters and authors have the tools and resources needed to provide high-quality presentations and papers. And, finally, the SAS Advisers help us in a multitude of ways. Thank you all for your time and effort so far!

Registration opens in April, so stay tuned for that announcement. I look forward to “seeing” you all in May.

What makes SAS Global Forum great? was published on SAS Users.

12月 172020

There’s nothing worse than being in the middle of a task and getting stuck. Being able to find quick tips and tricks to help you solve the task at hand, or simply entertain your curiosity, is key to maintaining your efficiency and building everyday skills. But how do you get quick information that’s ALSO engaging? By adding some personality to traditionally routine tutorials, you can learn and may even have fun at the same time. Cue the SAS Users YouTube channel.

With more than 50 videos that show personality published to-date and over 10,000 hours watched, there’s no shortage of learning going on. Our team of experts love to share their knowledge and passion (with personal flavor!) to give you solutions to those everyday tasks.

What better way to round out the year than provide a roundup of our most popular videos from 2020? Check out these crowd favorites:

Most viewed

  1. How to convert character to numeric in SAS
  2. How to import data from Excel to SAS
  3. How to export SAS data to Excel

Most hours watched

  1. How to import data from Excel to SAS
  2. How to convert character to numeric in SAS
  3. Simple Linear Regression in SAS
  4. How to export SAS data to Excel
  5. How to Create Macro Variables and Use Macro Functions
  6. The SAS Exam Experience | See a Performance-Based Question in Action
  7. How it Import CSV files into SAS
  8. SAS Certification Exam: 4 tips for success
  9. SAS Date Functions FAQs
  10. Merging Data Sets in SAS Using SQL

Latest hits

  1. Combining Data in SAS: DATA Step vs SQL
  2. How to Concatenate Values in SAS
  3. How to Market to Customers Based on Online Behavior
  4. How to Plan an Optimal Tour of London Using Network Optimization
  5. Multiple Linear Regression in SAS
  6. How to Build Customized Object Detection Models

Looking forward to 2021

We’ve got you covered! SAS will continue to publish videos throughout 2021. Subscribe now to the SAS Users YouTube channel, so you can be notified when we’re publishing new videos. Be on the lookout for some of the following topics:

  • Transforming variables in SAS
  • Tips for working with SAS Technical Support
  • How to use Git with SAS

2020 roundup: SAS Users YouTube channel how to tutorials was published on SAS Users.

12月 112020

In recent years, we've have seen some astronomical contracts given to professional athletes. Major League Baseball (MLB) has certainly had its share. One of its first notable “megadeals” was when Alex Rodriguez, the Seattle Mariners’ power-hitting shortstop, left the team to join the Texas Rangers in 2001. The Rangers committed [...]

Competing in the Big Leagues with or without Big Money was published on SAS Voices by Pete Berryman

12月 112020

In recent years, we've have seen some astronomical contracts given to professional athletes. Major League Baseball (MLB) has certainly had its share. One of its first notable “megadeals” was when Alex Rodriguez, the Seattle Mariners’ power-hitting shortstop, left the team to join the Texas Rangers in 2001. The Rangers committed [...]

Competing in the Big Leagues with or without Big Money was published on SAS Voices by Pete Berryman

12月 112020

In recent years, we've have seen some astronomical contracts given to professional athletes. Major League Baseball (MLB) has certainly had its share. One of its first notable “megadeals” was when Alex Rodriguez, the Seattle Mariners’ power-hitting shortstop, left the team to join the Texas Rangers in 2001. The Rangers committed [...]

Competing in the Big Leagues with or without Big Money was published on SAS Voices by Pete Berryman