The SAS Visual Analytics Key Value object was first introduced the 8.2 release and has gotten an enhanced Role: Lattice Category with the stable 2021.1 (May 2021) release. This is an optional Role and it allows the Key Value object to display the desired measure value for a by group which can be Datetime, Date, or Category data item.
There are lots of combinations of Options to customize the look and feel for the Key Value object. For example, there are two main styles: Text or Infographic but there are several options for including labels, values, highlight the max or min values, etc. Check out my first blog for those details where I cover the different combination of options.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
The main difference is the original Category Role has now been enhanced to be a Lattice Category Role. As you can see from the screenshot below, the original Key Value object would return just a single value, either the max or min based on the selected Options.
But the new Key Value with Lattice Category returns all of the category values for the assigned Role. In the below example, I have three Years in my data source: 2009, 2010, and 2011. We can see that the max Profit is for the Year 2011 and that is what the original Key Value object returns. In the new Key Value object, the Profit is returned for all of the values for Year and in this case the max is listed first.
How do you get back to the original Key Value behavior?
All you need to do is add a Rank to the new Key Value object. See the screenshot below, where I’ve added a Rank to the Year category, for the Top count of 1 By Profit. This returns the original Key Value state.
First, this will allow the Key Value object to return similar results to other objects when a category is specified. Think List Table, Crosstab, Bar Chart, etc and all the measures are summarized per the aggregation type and returned for all of the category values.
Second, this allows for multiple values to be returned in a single Key Value object for a specified category that will all be dynamically sized the same!! No more trying to get that dynamic formatting for different Key Value objects to look the same – they will now be the same size! This does not mean you can set an absolute font size, this means that all of the measure and category values will be apart of a single Key Value object and the sizing will be handled automatically.
In the example below, I did some additional data prep to essentially transpose my data. Now all of my Measure Types are in a single column and the Measure Values are in a single column as you can see in the bottom Crosstab. This allows me to use only one Key Value object and we can see how even with a long category value, Expense Long Name, all of the measure values are the same size.
Third, enhancements and improvement is the name of the game. This is just one of the latest enhancements to keep SAS Visual Analytics looking sharp and ease report development.
When you import or migrate your old reports that use the original Key Value object, don’t worry, those reports will look exactly as they did when you designed them. Those reports will reference the legacy Key Value object.
Going forward, however, for any new reports, the Objects pane will only have the enhanced Key Value object available for use. Like I mentioned above, you can easily apply a ”Rank of 1” to the new Key Value object to get the original look and feel of the object.
Here are some examples to give you an idea of some of the possibilities.
In this first screenshot, I’ve used the new Lattice layout Option with Column limit set to 1. This makes the Key Value elements vertical in a single column.
Here is a second example where I wanted to coordinate the color across the Lattice Category value. To do that I assigned a Report level Display Rule.
When using a Report level Display Rule, remember this can sometimes create unintended formatting. Just know that you can layer another Display Rule on top of the Report level at the Object level to get back your desired report look and feel.
More of my Visual Analytics related materials:
Additional materials for using parameters in SAS Visual Analytics:
How to prompt for a date range in a SAS Visual Analytics report Blog Series:
Find more articles from SAS Global Enablement and Learning here.
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.