This is my third article in a series of three that walks through different ways to customize your SAS Visual Analytics report. Check out the first entry on creating a custom graph and second article on augmenting data with custom categories.
As I mentioned previously in this series, creating reports in SAS Visual Analytics is a very iterative process. You start by building a graph, make incremental changes, review, make additional changes and so on. This last entry will focus on how to create a dynamic title for your report.
We start in Report Designer by building a simple Dual Axis Bar-Line Chart. The roles are defined as :
Sort the chart by Presidential Order in ascending order
Note - If you are using the companion SAS data set provided for these exercises, Presidential Order was changed from Measure to Category before adding it to the above chart. This is an example of how simple and straight forward it is to change the characteristics of your data.
One item that jumps out at me is that president number nine had an extremely short presidency (William Henry Harrison died after 31 days in office). But the graph is incomplete ... that is, unless I knew the name of president number nine, I would be left wondering. A visualization should never leave the user guessing what something means. A simple solution is to add a dynamic title that changes when the user selects a bar.
We will use the Button Bar to display the dynamic title in the existing dual axis bar chart
Now when you select an individual bar, the title will dynamically change to your selection.
The result is much better. A user can interact with the report and immediately know what president has been selected. But as the report currently exists, there is a limitation that can easily be fixed. If you deselect your selection on the chart, ALL the presidents show up in the button bar, which is extremely busy, as well as confusing. We can change this by creating a rank (on the button bar) for the category President, and showing the Top Count of 1, by frequency. Also, deselect ties, otherwise all presidents with a frequency of 1 will display. Now if you deselect your selection on the chart, only one president will show up in the button bar.
And don't forget you can always change the font, background color, etc. by clicking on the Styles tab on the right and making the appropriate changes.
This dynamic title helps to give more information about the report. But what if we want to add even more information to the report title? What if we want to include not only the name of the selected president (category), but also their age when first inaugurated (measure)?
To create a dynamic title with a combination of category and measure, we will need to create a calculation, and then apply that calculation to the button bar.
Belows are images of the formula, in both Visual and Text mode:
Dynamic titles are a very powerful feature that increases your users understanding of a report. I hope you are able to leverage them in your reports. Happy Visualizing!
Hi Steve,
I tried to create button bar to create dynamic title and I am not getting a option to create interaction from Dual line bar chart to this button bar. Could you please guide me ..!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.