You will not find an object in Visual Analytics named Dynamic Text. Instead, you will find a Text object that allows you to insert dynamically driven data items. By using the Text object's dynamic capabilities you can build custom report titles, object titles, emphasize measures and even supply the last modified time of the data source in your VA Report. In this post, I will outline the ways how you can leverage the Text object's dynamic capabilities.
In this example report below, I have used a red font color to indicate the dynamically driven text. (Click on the images to enlarge.)
Let's take a look the available dynamic roles in the Text object. You can see from the Objects pane that the Text object is grouped under Other.
From the Data pane we have the ability to add both Measure and Parameter data items. From the interactive editor of the Text object shown below, we also have the ability to insert the Table Modified Time and Interactive Filters.
The following sections will demonstrate how to configure each of these dynamically driven elements of the Text object.
The out of the box display for Interactive Filters includes the selected values for control objects added to either the Report or Page Prompt areas.
To edit, be sure you are in Edit mode of Explore and Visualize. Click on the Text object to make it the active window and double click inside, then the interactive editor will open. Next, click on the Interactive Filters button. Use your cursor to position where you would like to add static text. In this case, I added the qualifier Default filter information:.
Multiple control object values are separated by a comma and also accommodates multi-value control objects.
While the Interactive Filter functionality is extremely useful, you may want to use prompt values more granularly to create custom report titles or even object titles. To do this, you must first create a parameter to hold the value selected in the control object, then use that parameter in the Text object.
In my example report, I have two prompts and two custom object titles leveraging parameters. Let's look at each one individually.
First is the Report Prompt, which prompts for year.
The steps are similar for the Page Prompt, which prompts for region. (Remember to click on the image to enlarge.)
Even though I demonstrate how to do this for both Report and Page Prompts, this same technique can be used for report canvas prompts. You just have to be sure you store the selected value(s) in a parameter that you can then use in the Text object's Parameter Role.
Very much the same way the Text object's Roles are used to assign the Parameter values, we can do the same thing with a measure. This measure will be affected by any Report or Page Prompts automatically, but if you want to use a report canvas prompt you will need to create the Actions to the Text object appropriately.
Here you can see we are using the measure TotalExpense which is an aggregated measure of Expenses. Like in the previous examples, be sure to assign the measure to the Text object then double click to open the editor and use your cursor to add the static text.
The only applied filters for this aggregated measure are the selected year and region, therefore this Sum _ByGroup_ will return the Total Expenses for that Year and Region.
Table Modified Time
The last capability of dynamic text available in the Text object is the Table Modified Time.
The out of the box display uses the fully qualified datetime stamp and cannot be altered to a different format. To edit, double click inside the Text object and the editor will open. Then click on the Table Modified Time button. Next, use your cursor to position where you would like to add static text. In this case, I added the qualifier Data last updated:
The main takeaways from this post are twofold, first is that you can easily build dynamic customizable titles, emphasize measures or parameter values.
Second, look to use the Text object for your dynamic text needs.
Here is a quick mapping as a review of what was detailed in the steps above.
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.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.