BookmarkSubscribeRSS Feed

SAS Visual Analytics Display Rules: Report – Level

Started ‎04-10-2023 by
Modified ‎07-19-2023 by
Views 1,367

This is the first post in a series about the available Display Rules in SAS Visual Analytics. Display Rules allow you to conditionally highlight data that meet defined criteria. There are three types of display rules and here are examples for each type.

 

  • Color-mapped Value: based on a Category data item.
  • Expression: based on a measure data item expression.
  • Gauge: based on a measure data item interval definition.

 

Notice the conditions defined in the Rules pane. These Boolean conditions are evaluated for each visualization based on the assigned data Roles.  

 

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

 

You can define Display Rules for the different types of Visual Analytics objects at the following levels. Be aware that not every level supports all types of Display Rules.

 

 

Report – Level

 

We will focus on a Report – Level Display Rule in this post. The only available type of Display Rule at the Report – Level is the Color-mapped Value rule.  

 

The Report-Level Display Rule is incredibly powerful for a number of reasons:

 

  • Available Display Rule type: Color-Mapped Values
  • Applied to all applicable objects in all pages of the report
  • Not tied to a Data Source or data item
  • If multiple Display Rules are defined, the Object Level Display Rule takes precedence

 

The Color-Mapped Value Display Rule requires a case sensitive category data item value, i.e. string value, and a color. Then, every time a Visual Analytics object is rendered, the results will be conditionally evaluated to determine if any category data item values have a display rule defined and if true, it will try to apply that color to the object.  

 

As you can imagine, there will be lots of conditions where a Color-Mapped Value Display Rule cannot be applied or requires a specific Data Role assignment combination. For a full list of details see the SAS Visual Analytics Documentation: Working with Display Rules. As an example, for the Line Chart Object, the category data item will need to be assigned to the Group Role. And that Crosstab Objects require a Table-Level Color-Mapped Value Display Rule and is not affected by a Report-Level Display Rule.  

 

One of the key reasons to use a Report-Level Display Rule is to get consistent coloring for a category data item value across the report. This is important especially if your report uses Control Objects to filter your data because returned results may not always order the values the same way. And if say, for example, the Product Line Stuffed Animal value is colored yellow on one Page 1 of the report but blue on Page 2, it could confuse your report consumers.  

 

Define a Report-Level Display Rule

 

Let’s take a look at how you can define the Report-Level Display Rule. First, select the Rules pane and then use the drop-down menu to select the name of your report. This will activate the Report-Level Display Rules menu. Next, click the + New rule and the New Display Rule window will open.  

 

02_NewDisplayRule.png

  

Then start typing the case sensitive string value you want to define a display rule for. Next, pick the color assignment from either the predefined Basic colors or use the Custom tab. Use the + to add additional values to define rules for. 

 

03_DefineDisplayRule.png

 

 Report-Level Display Rule Examples

 

Now let’s take a look at how some of the Visual Analytics objects use a Display Rule. I will also include screenshots of filter selections to show how using a Report-Level Display Rule can be important.  

 

The Report-Level Display Rule screenshots will be on the left and the report default coloring will be on the right. As a reminder, here is our Report-Level Display Rule definition:  

 

04_ExampleDisplayRule.png

  

List Table, Bar Chart, Line Chart Page

 

Here, in this example, you can see how assigning the Report-Level Display Rule is keeping the color of Action Figure, purple, the same even with filtering on the left. In the default coloring on the right, we can see that Action Figure is styled purple but with filtering it is then styled yellow.  

 

List Table

 

Notice that the behavior of a Report-Level Display Rule colors the entire row of the List Table object. If this styling is too much, then you can define a Table-Level Display Rule which will take precedence over the Report-Level. There, you can style the List Table to have a white background.  

 

Line Chart

 

The Line Chart object requires the category data item to be assigned to the Group Role in order for a Report-Level Display Rule to be applied.  

 

05_Page1_NoFilter-1536x610.png

 

06_Page1_NorthFilter-1536x609.png

   

Crosstab, Pie Chart, Treemap Page

 

Crosstab

 

Here you can see that the Crosstab object does not respond to Report-Level Display Rules. You can use a Color-Mapped Value Display Rule but it must be defined at the Table-Level for Crosstab objects.  

 

Treemap

 

In the default coloring report, I did not assign a Color Role for the Treemap. If there were a Color Role assignment then that would take precedence over the Report-Level Display Rule.  

 

07_Page2_NoFilter-1536x610.png

 

08_Page2_SouthFilter-1536x610.png

  

 Key Value, Geo Map Page

 

I think this is another great example of how the use of color really helps see the connection between the two visualizations. It’s very easy to see on the right which Key Values map to the Pie Geo Maps.  

 

09_Page3_NoFilter-1536x609.png

 

10_Page3_SouthFilter-1536x610.png

   

Multiple Data Sources Page

 

I mentioned earlier that one of the key benefits of a Report-Level Display Rule is that it is not tied to a Data Source. This is one of the few features that gets applied at the Report-Level.  

 

In this example, I have added two additional data sources: Insight Toy and Cars. Insight Toy has one overlapping value for Product Line, Game that you can see in the upper left that gets picked up by the Report-Level Display Rule. In the object below, you can see that I have used Product Line Custom Category in the Bar Chart. For this data item, I created a Custom Category to map additional Product Line values and we can see how once that Custom Category data item is included in the object’s Role assignments, then more of the Report-Level Display Rules are able to be applied.  

 

Similarly with the Cars data source. We can see that by default, there are no mapping values between the Type data item and the defined Report-Level Display Rule. But I created a Type Custom Category where I mapped some of the Car Type values to match the Report-Level Display Rule.  

 

11_MultipleDataSources.png

 

Summary

 

I hope these examples have given you a starting point to include Report-Level Display Rules in your reports. This is especially critical when the consistency of styling a value can impact your data analysis.  

 

Remember there are a number of other reasons the Report-Level Display Rule is incredibly powerful:

 

  • Available Display Rule type: Color-Mapped Values
  • Applied to all applicable objects in all pages of the report
  • Not tied to a Data Source or Column
  • If multiple Display Rules are defined, the Object Level Display Rule takes precedence

 

This is just the first post in this series. I’ll cover the remaining types of Display Rules in the following posts.

 

  • Report – Level (this article!)
  • Table - Level
  • Graph - Level
  • Gauge - Level

   

I cover additional tips and tricks in these other helpful articles:

 

 

Find more articles from SAS Global Enablement and Learning here.

 

 

Version history
Last update:
‎07-19-2023 02:03 PM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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 Labels
Article Tags