BookmarkSubscribeRSS Feed

SAS Visual Analytics Report Summary, what kind of beast is this?

Started ‎04-23-2019 by
Modified ‎04-24-2019 by
Views 2,824

Reading the title, you might think: I know all those words but what are they doing in the same sentence?

  • Visual Analytics: I know this is the tool to design and display reports.
  • Report: I remember someone told me that it was a powerful SAS procedure but it was too complex for me.
  • Summary: This is one of the first SAS procedures I used to feel like a statistician.

Well ... starting with SAS Visual Analytics 8.3.1, the report summary functionality became an option when designing the reports. I will explain what it is and how to use it.

 

To define report summary

SAS Report Summary helps to describe the report in a few sentences to replicate a speech-template. The functionality provides a dynamic description of the report:

  • Conditional text
  • Dynamic values
  • Natural Language Generation

The report summary is impacted by the data and the current report view. For example, the report groups data by brands and a graph displays the brands ranked by their sales. The report summary can display the top brand name with the sales amount. If the top brand changes across time, there will be no need to adapt the report summary as it will automatically be updated based on the latest view in the report.

 

To view report summary

Simple report summary examples:

  • When USA is selected in the filter:

xab_ReportSummary_USAFilter.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

  • When Europe is selected in the filter:

xab_ReportSummary_EuropeFilter.png

 

The report summary displays:

  • when viewing a report

xab_ReportSummary_ShowInReport.png

 

xab_ReportSummary_Viewer.png

  • from SAS Drive's report information icon

xab_ReportSummary_SASDrivePreview.png

 

xab_ReportSummary_SASDrive.png

 

xab_ReportSummary_EmailReport-2.png

 

To create a simple report summary

  • Open or create a report using SAS Visual Analytics.
  • Open the Options pane (pinning the pane will make your life easier).
  • From the Options pane, select the report as the active object.
  • Scroll to the bottom of the Options pane
  • In the Summary option, enter the text you want to display.

    Pro Tip: To enter the data item names, you must use the arrow below the Summary box to select the data item. If you type the variable name, the substitution will not happen and it will appear as text in the report summary.

Select the full-screen icon to see a larger version.

To format the values

You can use functions to format data item values. The functions that are available are provided by Apache Velocity. According to Wikipedia, Apache Velocity is a Java-based template engine that provides a template language to reference objects defined in Java code. It aims to ensure clean separation between the presentation tier and business tiers in a Web application (the model–view–controller design pattern).

 

Within SAS report summary, some functions are implemented mainly to format numbers. Other functions to perform simple calculations and simple grammatical manipulations are also available.

 

You can easily use the following functions to format numbers using NumberTool:

  • $NumberTool.integer(object) to display the number as an integer.
  • $NumberTool.currency(object) to display the number as a currency value.
  • $NumberTool.percent(object) to display the number as a percentage.
  • $NumberTool.format(format, object) to display a number with a specific format. For example: $NumberTool.format("0.0000", object) will return a number with 4 decimals.

MathTool can be used to perform mathematical functions:

  • $MathTool.ceil(object) to return the smallest integer value that is bigger than or equal to a number.
  • $MathTool.floor(object) to return the smallest integer value that is smaller than a number.
  • $MathTool.round(digits, object) to round a number to the specified number of decimal places.

 

LangTool is managed by SAS R&D and can be used to perform simple language functions:

  • $LangTool.nounForm(object, times) to return the singular or plural form of the object based on the times value.
  • $LangTool.verbForm(subject, verb) to return the correctly conjugated verb given a noun as the subject.
  • $LangTool.numberToOrdinal(number) to return the integer as an ordinal number, not spelled out.

Using these format functions we can adapt our code and format the Invoice with currency. The code will look like this:

 

xab_ReportSummary_Format.png

 

And it will generate:

 

xab_ReportSummary_FormatResult.png

 

To define more logic

You can also use IF/THEN/ELSE statements.

 

#if(some condition) Text to display
#elseif(some other condition) Another text to display
#else Yet another text to display
#end

 

The code will look like this:

 

xab_ReportSummary_Conditional.png

 

And it will generate:

 

xab_ReportSummary_ConditionalResult.png

 

Conclusion

Executive/management summary, elevator speech are what managers and end-users are looking for. At the first read, they should understand what's in it for them. This is exactly what Report Summary brings to them. If your report has a well designed summary, all users at all levels of the company will get the same message. They will have one version of the truth.

 

As you can see, it is quite easy to generate a report summary that will provide meaningful information to the report user about how to interpret the report. It might help reducing misinterpretation of the data.

 

The functions that are available to format the numbers and text are documented on the Apache Velocity website. The Documentation team at SAS is working on improving the documentation as R&D increases the number of functions. 

Comments

Thanks for writing the article @XavierBizoux and sharing the new functionality and these undocumented features. It would be helpful for the community to have it documented.

 

#moredocumentation tag - it seems tags can only be added to the article rather than the comment.

 

Kind Regards,

Michelle

Hi Michelle, 

 

Thank you for the feedback. 

 

I will read the comments and use them internally to get back to the documentation team.

 

So, using the hashtag is still the way to go as it will be an easy pointer. 

 

Regards,

 

Xavier

@XavierBizoux what version of VA is this available to, I don't see anywhere where i can produce a summary report or even add comments. my version:

jimbobob_0-1659732319838.png

Do i need to enable something in the Environment Manager?

Hi, 

 

Report Summary functionality is available since version 8.5 of Visual Analytics. 

To define the Report Summary, you should select the report object and not a specific object. You can see this in the video in this blog.

If you don't select the report top level, you will not be able to add the summary. 

If this is not working, you should most probably check with Technical Support. They will be able to help you solving that issue. 

 

Regards, 

Xavier

Version history
Last update:
‎04-24-2019 03:42 PM
Updated by:
Contributors

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags