BookmarkSubscribeRSS Feed

SAS VA: Automatic Actions Part 1 – Easy exploration for multiple data sources

Started ‎03-01-2022 by
Modified ‎06-08-2022 by
Views 2,100

If you’ve not explored data with Automatic Actions enabled, then read on to learn about a fast and easy way to explore multiple data sources at once.

 

In Part 1 of this series, I will focus on the One-way filters option. The other coming articles will cover the Two-way filters and Linked selection.

 

For the entire series so far:

 

 

Two of the six Page Templates, which were first introduced in SAS Visual Analytics 8.5, are designed with Automatic Actions enabled. Both templates are using One-way filters and have the Display filter breadcrumb selected which are both circled in red below.

 

01_PageTemplateExamples.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.

 

 

 

 

Here are the benefits and behaviors of using Automatic Actions: One-way filters:

 

  • Applied at the Page level. This means all objects on the page will be filtered if possible.
  • Same data source objects are filter automatically, different data source objects require column mappings to be defined under the global Map Data.
  • Filters are combined with the AND operator and applied in the order in which they are selected.

 

We will also cover some Pro Tips for when using Automatic Actions:

 

  • For Control Objects:
    • If you want to filter multiple data sources, use the columns from the Global Mapped Data definition for the Role assignment.
    • Use the mapped column with the highest cardinality.
  • Use the original column in visualizations and not the Custom Category used for mapping data.
  • Use Object Titles to label the data source.

 

Data Sources Used

 

In my examples, I will be using Mega Corp and Insight Toy data sources which have a bit of overlap. I show how you can explore both of these data sources easily by defining column mappings using Custom Categories.

 

Here is a look at both data sources from the Data pane. As you can see, Insight Toy has more Years of data and more Product Lines than Mega Corp.

 

02_DataSourcesUsed.png

 

Use Custom Categories for Data Mapping

 

The Year columns for both data sources are SAS Dates and both use the YEAR format, so I don’t need to worry about creating a Custom Category to get those underlying values to match up for mapping.

 

Product Line on the other hand, as you can see below, only has one matching value that is in both data sources, Game. Therefore, I will create a new Custom Category to align the Product Lines that should map for my business needs.

 

As you can see in my highlighting below, I used some of the values from each data source to create my Custom Category. The key benefits of using Custom Categories to be used for the Data Mapping is:

 

  • No need to alter the underlying data source values.
  • Use Custom Categories for the Data Mapping and Control Objects but use the original column in the report objects.
  • Custom Categories can be created on the fly and changed easily.

 

03_CustomCategoryMappings.png

 

 

To create a new Custom Category you can either use the + New data item menu or right-click on the source column and select New custom category....

 

04_NewCustomCategory.png

 

 

Here are the Custom Category definitions for the Product Line Custom columns for both Mega Corp and Insight Toys. Notice that I only have to define new Value Groups for the values I want to change so the mappings will align. To have all of the other values stay the same, select Show as is for the Remaining Values.

 

05_MegaCorp_ProdLineCustom.png

 

 

06_InsightToy_ProdLineCustom.png

 

Define Data Mapping

 

Now that we have the two columns we want to map, Year and Product Line Custom we need to define the Data Mapping. I am only mapping these two columns because these are the two columns I will use for Control Objects to prompt/filter my data. You would want to map all the columns that need to align in your data that you want to use for filtering.

 

Since we only have two data sources right now, selecting either data source will cover all of the table combinations. Use the Data menu and select Map data....

 

07_GlobalMapData.png

 

  Then select the box to Enable data mapping. Next, for each data source, select the columns to map.

 

08_DefineDataMapping.png

 

Enable Automatic Actions, design report and explore your data!

 

Use the Actions pane to enable Automatic Actions. Be sure you are at the page level of the report and then select One-way filters and I like to Display filter breadcrumb.

 

A few Pro Tip suggestions to look for in this report:

 

  • For Control Objects:
    • If you want to filter multiple data sources, use the columns from the Global Mapped Data definition for the Role assignment.
    • Use the mapped column with the highest cardinality.
  • Use the original column in visualizations and not the Custom Category used for mapping data.
  • Use Object Titles to label the data source.

 

09_EnableAutomaticActions_v2.png

 

Here are screenshots of an example click path:

 

10_ExampleClickPath01.png

 

 

11_ExampleClickPath02.png

 

12_ExampleClickPath03.png

 

 

So all four objects were filtered with that click path. No additional Action definitions were required. If no global data mapping had been defined, then only the data source that matched the Control Object data source would have been filtered. But, since I had Global Data Mapping defined, the Control Objects were able to filter for both data sources.

 

Add Mappings for Additional Data Sources

 

Depending on your business needs, you may want to prompt/filter unrelated data sources in your exploration journey. Using the same Custom Category technique described above, creating a common column to use for your Data Mapping is easy. It’s always nice to keep one tab in the report dedicated to your data mappings so that if others open the report, they can easily look up what to expect when certain values are selected in the Control Objects. This is especially helpful if the underlying data sources do not have matching values and are using Custom Categories for data mapping.

 

In this example, you can see that I added the data source Cars to the report. Here is how I decided to map the Type column in Cars to the other Product Line Custom values.

 

13_ThirdDataSourceMappings.png

 

This is what the Custom Category definition for the new Type Custom column looks like:

 

14_CarsCustomCategory.png

 

Update Global Data Mapping

 

Now we need to update the global data mapping for the report. Now that we’ve added a third data source to the report, the easiest way to make sure we have hit all of the necessary mapping combinations for the new data source is to select the new data source first before going to the global Map data... menu.

 

Then you can easily select the Custom Category columns to map between the source and target tables.

 

15_UpdateGlobalDataMapping.png

 

Explore the data All the key points I mentioned above about using the data source to assign Roles to the Control Objects with the highest cardinality still apply. Here we can see how this filter combination results in the below example.

 

16_ExploreThreeDataSourcesExample.png

 

 

I hope from these examples you can see the power behind using Automatic Actions for your report design and data exploration. There’s no need to have a precise design layout and Action flow diagram planned, simply turn on Automatic Actions and take the time to explore your data. Use Custom Categories to easily map closely related data that don’t have exact underlying values to save data prep time.

 

This is a great feature for fast report building but a critical tool for exploring one or more data sources together. 

 

 

For the entire series so far:

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎06-08-2022 05:20 PM
Updated by:
Contributors

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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