BookmarkSubscribeRSS Feed

SAS Visual Analytics trick! Use a button bar as a dynamic text object

Started ‎12-13-2016 by
Modified ‎12-14-2016 by
Views 19,955

Looking for a way to display dynamic text in a text box in SAS Visual Analytics? Look no further. You can allow a button bar control object to masquerade as a text box. Let me tell you how.

The report below includes a title that displays text along with the value of the selected period.

 

TextButton1.jpg  

 

The report example includes a list table object that displays data for periods. A period (Date by Month) is selected using a drop-down list.  A button bar is incorporated to display the header text, the category role for the button specified as  the value of a calculated data item, Report Description.

 

TextButton2.jpg TextButton3.jpg

 

This example uses a calculated data item (Report Description) created in the designer. The expression for calculated data item Report Description makes use of the concatenation and format operators to combine text and numeric information. The expression in both visual and text mode:

 

TextButton4.jpg  

 

Filter Interactions are defined between the drop-down list and the list table and the drop-down list and the button bar.

 

TextButton5.jpg  

 

Now how about adding a second title line (another button bar) that contains the total operations expenses value for that month?

 

TextButton6.jpg  

 

For this example, it would be great if we could create an aggregation (sum overall) and concatenate that value, but we’re unable to use an aggregation in a calculation. So instead, just use the Visual Data builder to create a new table containing only the aggregations of operational expenses by the Date by Month data item. Once you have your new table (sample below) you can then create a new button bar based on the new table.

 

TextButton7.jpg  

 

The Category role for the new button bar will be the value of a new calculated data item, total operational expenses.  The visual and text versions of the expression are below:

 

TextButton8.jpg  

 

One additional interaction is added, as shown:

 

TextButton9.jpg

 

 

Comments

This is great, but how do you get the button bar to print when you create a info window and allow pdf printing?

We still need to do this in the 7.4 version?

I heard that in 7.4 a new enhancement is "dynamic text". This functionality will replace the need to do what is described in this post? 
Thank you, Rodrigo

Rodrigo, you are correct. The dynamic text feature is available in Visual Analytics 7.4, and you can use that feature instead of the Button Bar approach.


Button Bars are still useful to display dynamic category values which is not possible in 7.4

Version history
Last update:
‎12-14-2016 09:18 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Labels
Article Tags