BookmarkSubscribeRSS Feed

SAS Visual Analytics: Configure Cascading Prompts

Started Tuesday by
Modified Tuesday by
Views 53

Cascading prompts are a series of Visual Analytics control objects that filter the available values in other control objects. This is useful as it can help report viewers easily select valid prompt values and navigate one-to-many relationships. Let’s take a look at the steps in the latest version of SAS Visual Analytics to create cascading prompts in three areas.

 

Prompt Area Prompt Behavior
Report Prompts Filter all objects on all pages*
Page Prompts Filter all objects on the current page*
Canvas Prompts Must be configured to filter objects

 

*Objects with the same data source are filtered automatically, otherwise you can map columns for different data sources to filter using the same control objects.

 

01_PromptLocations.png01_PromptLocations.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.

 

Use the small arrows to expand or collapse the report and page prompt areas.

 

02_ExpandPromptAreas.png02_ExpandPromptAreas.png

 

Report and Page Prompts using Auto Controls

 

Control objects placed in the report prompt area will filter all objects on all pages of the report whereas control objects placed in the page prompt area filter all objects on the current page. If the control objects use the same data source as the objects, then the filtering will happen automatically. If they use different data sources, then you can use the map data sources to configure the matching columns. See this article or YouTube for more details: SAS Visual Analytics 8.1: Configuring prompts with different source data.

 

These prompt areas are special, in that if you drag a data item into the area, an auto control is selected and added automatically based on the data item’s cardinality. Additionally, these auto controls understand hierarchies, and this means we can use either auto controls or manually configure cascading prompts.

 

Hierarchy with Auto Controls

Let’s look at using auto controls with a defined hierarchy. The main benefit of using a hierarchy with auto controls is that Visual Analytics automatically selects and adds a control object based on data item cardinality but also creates the cascading filter definitions between the control objects.

 

Using the MEGA_CORP data source, I have defined a hierarchy: Product Brand – Product Line – Product.

 

03_HierarchyDefinition.png03_HierarchyDefinition.png

You can either right-click on the hierarchy and use the Add as report control or Add as page control.

 

04_HierarchyAddToReportControl-1024x552.png04_HierarchyAddToReportControl-1024x552.png

Or you can drag the hierarchy from the Data pane to the Report or Page Prompt area.

 

05_HierarchyDragToReportControl-1024x552.png05_HierarchyDragToReportControl-1024x552.png


The result is that Vsual Analytics automatically selects cardinality-driven control objects, assigns data roles, and configures filters between the objects in accordance with the defined hierarchy. Here we can see that button bars are selected for both Product Brand and Product Line and a drop-down list object selected for Product.

 

From the Actions pane:

 

  • The Product Brand control object has a filter action defined to both control objects for Product Line and Product
  • The Product Line control object has a filter action defined to the control object for Product only

06_HierarchyAutoControls-1024x524.png06_HierarchyAutoControls-1024x524.png


When selections are made, the report objects are filtered automatically since these objects all use the same data source. This automatic filtering cannot be unconfigured.

 

07_ExampleReportControls.png07_ExampleReportControls.png


Manual Configuration with Auto Controls

If you don’t use a hierarchy, you can still configure cascading prompts in the Report and Page prompt areas using auto controls but you will need to manually configure the filter actions.

 

First, right-click and add the data item to the desired prompt area or drag the data item to have Visual Analytics add an auto control object for you.

 

In this example, I am adding Date by Year.

 

08_YearPageAutoControl-1024x503.png08_YearPageAutoControl-1024x503.png


Repeat the same for another data item, in this example, I’ve added Facility Region.

 

09_RegionPageAutoControl-1024x501.png09_RegionPageAutoControl-1024x501.png


Configure the Filter Action

Right now, both page controls automatically filter the objects on the page; however, they do not automatically filter each other. Therefore, we must configure a filter action between the control objects in the Page Prompt area.

 

  1. Select the Date by Year slider control object
  2. Open the Actions pane
  3. Select the Object Links to the Facility Region button bar

 

10_ConfigureFilterAction-1024x716.png10_ConfigureFilterAction-1024x716.png


I added a Text object at the bottom of the report with Interactive Filters so that we can clearly see all of the filters applied to the page 2 objects in the report. We can see that both the Report Prompt and Page Prompt selections are applied.

 

11_ExampleReportAndPagePrompts.png11_ExampleReportAndPagePrompts.png

 

Report Canvas

 

Configuring cascading prompts in the report canvas requires an additional step of selecting the type of Control object to use for your data item in addition to manually configuring the Filter Actions. This is because the auto charting feature for a single data item when dragged to the report canvas will generally result in bar chart for categories and measures and line chart for date data items.

 

Here are the steps to configure cascading prompts in the report canvas:

 

  1. Add control objects to report canvas
  2. Assign data item to control objects
  3. Configure a Filter Action for each prompt, starting with the top level of the cascade and working down to the lowest level
  4. Configure a Filter Action to each report object from the lowest level in the cascading prompts. This will automatically create the indirect filters from the cascade and you will only need to configure the one filter to the report object

 

Pro Tip: It helps if you have a plan of how you’d like your report to look and the prompts you want to configure.  

 

Example

Here is the report I want to build out for my canvas report cascading prompts. You can see that by not using the Report or Page prompt areas, there are a lot of Filter Actions that must be configured.  

 

The solid lines represent the required filter actions that must be configured. The dashed lines represent the indirect filter actions that get automatically configured by nature of the cascading prompt definition.  

 

12_ReportCanvasCascadingPrompts-1024x915.png12_ReportCanvasCascadingPrompts-1024x915.png


Step 1: Add control objects to report canvas

Using the Objects pane, add the control objects to the report canvas by right-clicking and add to page or by dragging them into the report.

 

Be sure that you place these control objects in the report canvas and not the prompting areas. One way to ensure the correct placement by expanding the prompting areas so that you can verify none of the control objects end up in these locations. If you are experiencing “funky” filtering, be sure to check these prompt areas because an accidental drag to this location could be the culprit.

 

13_Step1_AddControlObjects-1024x400.png13_Step1_AddControlObjects-1024x400.png


Step 2: Assign data item to control objects

Use the Data Roles pane to assign data items to each control object. You can also use the Options pane to customize and style each control object. Here you can see that I have added titles to each object and customized the selected background and text color.

 

14_Step2_AssignDataRoles-1024x374.png14_Step2_AssignDataRoles-1024x374.png


Step 3: Configure a Filter Action for each prompt, starting with the top level of the cascade and working down to the lowest level

Use the Actions pane to define filter actions to create the cascade of filters through each control object.

 

15_Step3_ConfigureFilterActions-1024x499.png15_Step3_ConfigureFilterActions-1024x499.png


Step 4: Configure a Filter Action to each report object from the lowest level in the cascading prompts. This will automatically create the indirect filters from the cascade and you will only need to configure the one filter to the report object

For the objects that I want filtered to the Facility Region level, I need to configure the Filter Action from that point in the cascading prompts. I will select the button bar for Facility Region and use the Actions pane to configure a filter to the box plot, list table, and the text object to display the Interactive Filters so we can see the values being passed to these objects.

 

We can see from the text object that both the values from the slider for Date by Month and Facility Region are successfully filtering these objects.

 

16_Step4_ConfigureFilterToReportObjects-1024x613.png16_Step4_ConfigureFilterToReportObjects-1024x613.png


For the objects I want filtered to the Product level, I need to configure the Filter Action from the lowest point in the cascading prompts. I will select the drop-down list for Product and use the Actions pane to configure a filter to the bar chart, time series, and the text object to display the Interactive Filters so we can see the values being passed to these objects.

 

We can see from the text object that even though we only configured the Filter Action from the lowest prompt in the cascade, all four selected control object values are being passed to the objects. These are called indirect filters.

 

17_Step4_ConfigureFilterToReportObjects-1024x613.png17_Step4_ConfigureFilterToReportObjects-1024x613.png

 

Conclusion

 

You have now seen how to use auto controls in either the Report or Page prompt areas with a hierarchy and having to manually configure the filter actions to create the cascading prompts. The main advantage to using these prompting areas is the automatically applied filters to report objects for either the entire report or page.

 

If you need a more customized report, where only certain report objects are to be filtered by different levels of the cascading prompts, then you may need to use canvas level prompts. This does require additional steps, but this is the only configuration that allows for the ability to control which report objects receives the filter action.

 

For additional information:

 

 

 

Find more articles from SAS Global Enablement and Learning here.

Contributors
Version history
Last update:
Tuesday
Updated by:

Viya Copilot Motion Graphic.gifViya Copilot Motion Graphic

Ready to see what SAS Viya Copilot can do?

Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.

Get Started →

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