Using Data Views in SAS Visual Analytics

2

In SAS Visual Analytics 8.3, a Data View is a reusable and shareable template for a data source. That means that the data view is tied to the data source, and not to the report. If you update a data view it will not automatically propagate those changes into a report.
 
So, what can a data view do for you? Plenty! Here are just a few of the settings and customizations that a data view can save for a data source: (taken from documentation here):

  • Data item settings such as names, formats, classifications, and aggregations
  • Data source filters
  • Hierarchies
  • Derived data items
  • Calculated items
  • Custom categories
  • Duplicate data items
  • Show / hide status for data items
  • Unique row identifier selection

Create a Data View

Now you must be wondering, how do you save all these wonderful customizations for your data source? Answer: by creating a Data View.
 
To get started, use the Data Source menu and select Save data view…. In this example, I created a hierarchy for the SASHELP CARS data set but as you can see from the list above you could have created many more calculations, custom categories, etc.
 
 

 
Then give the Data View a name. A few other things you may notice about this Save Data View dialogue are the options for: Default data view and Shared data view.
 
 

Default data view

A default data view is automatically applied whenever the data source is added to the report.
 
Each user can create their own data view of the source data and select their own default data view. This could lead to each user having a personalized default view. But, what if you want share your data views with others on your team? Or have everyone start with the same default view? That is when you need to first be an Application Administrator and second use the Shared data view option.

Shared data view

In order to be able to share a data view, you must be an Application Administrator. Then the option to share a data view will be available. Once a data view is shared for a data source, other users with access to that data source will be able to apply that data view.

Apply a Data View

Data views are templates of saved settings, hierarchies, custom categories, calculated data item, etc. which can be combined in an infinite amount of ways. Therefore, it follows that multiple data views can be applied to the same data source. In the example above, I created a new hierarchy for the SASHELP CARS data set. But I could also create a new data view which changes the aggregation of the MPG measures to reflect the average aggregation and not the default sum aggregation.

To apply a data view: open a new report, select your data source, then use the Data Source menu and select Data views…. You will see any individually created data views as well as any shared data views. Highlight the data view you wish to apply, then select Apply. Repeat for all of the data views you wish to apply.

If any data items are duplicated with the addition of data views then, as shown below, those data items are given a (n) after their names.

Administrator-controlled Default Data View

We've learned what Data Views are and that we can share them. How can we ensure that all the users who select a data source get the same starting point with a particular data view? To set this up, you must be an Application Administrator and the Data View must be Shared.
 
Once these two criteria are met, you can navigate to the report's overflow menu and select Edit administration settings. Then select the data source and which data view to apply as the default for all users.


 
Caution: If the user has already selected a personal default data view, then the personal default data view overrides the administrator-set default data view. Remember that an individual user can apply a personal or another shared data view and override the default data view.

Results of applying a default data view

Now let's take a look at the effects of an applied default data view. Whether this is a personal default data view or administrator set default data view, the resulting behavior is the same.

The default data view will be applied as the data source is added to the report, which eliminates the duplication of any data items that had any data item properties adjusted. As you saw above, when you apply a data view with the same data item name but different properties, it creates a duplicate of that data item. This behavior is different when a data view is set as the default. The default data view will apply those data item properties as the data source is added to the report and not "on top of" the existing data pane settings.

Let's look at a data view for the SASHELP CARS data source that has both the hierarchy definition and the changed aggregation for the MPG data items. As you can see I've saved it as both a Default data view, which makes it a personal default data view, and a Shared data view.

Here is what the data pane would look like. Notice that the hierarchy is there and that there are no duplicate data items for MPG(City) and MPG(Highway) but their aggregations reflect the change to "Average" that I applied in the data view.

Conclusion

Data Views are just one of the exciting new features in SAS Visual Analytics 8.3. A few key points to remember:

  • Data Views are tied to a data source, not a report. If a data view is edited, those edits do not propagate to the reports that applied that Data View.
  • A data source can have multiple Data Views applied.
  • Only an Application Administrator can share a data view with other users as well as define a default data view for a data source for all users. Any personal defined default data views override the administrator-set default data view.
  • A default data view, either personal or set up by an administrator, will not duplicate data items but simply apply the view's property changes in the data pane when the data source is added to the report.
  • Data Views are a template of data settings and edits – not a fully robust semantic layer where updates are pushed to all instances of usage. While Data Views can be used to assist in defining commonly used calculations and custom categories, remember that each user can still create their own data views and thus override the administrator-set default.
Share

About Author

Teri Patsilaras

Senior Manager

Teri Patsilaras is a Senior Manager in the Global Enablement and Learning (GEL) Team within SAS R&D's Global Technical Enablement Division. Teri works to enable SAS technologists on the latest data visualization techniques and how to leverage SAS Visual Analytics to meet customer needs. She has extensive knowledge of report design methodologies and how to efficiently and effectively apply data visualization methods.

2 Comments

  1. Teri, This is a great method, but I am wondering if there's a way (in 8.3) to simply change the URL (with a parameter on the URL itself) in order to display the report with differing results.
    Eg.
    https://itviya.sas.com/links/resources/report?uri=/reports/reports/be8d3bce-b790-4621-93af-d9f54d8c35b9&page=vi6&PLocation=CANADA
    or
    https://itviya.sas.com/links/resources/report?uri=/reports/reports/be8d3bce-b790-4621-93af-d9f54d8c35b9&page=vi6&PLocation=NORWAY
    etc.

    Do you have any blog articles on this? Thanks in advance, Chris

    • Teri Patsilaras
      Teri Patsilaras on

      Hi Chris,

      I do have a blog that outlines the steps for SAS VA 7.2: Accessing VA Reports with Parameterized URLs

      The difference for VA 8.3 is that you cannot use the Email feature to grab the Report Name and Report Path since it uses the URI. The easiest place to grab these values are from Environment Manager under the Content tab. Once there, browse to your report, then you can easily identify the Report Name and Report Path to use in your URL.

      Use my VA 7.2 blog to help walk through the steps of creating the corresponding parameters to store the control object values and then most everything else is the same.

      Thank you,
      Teri

Leave A Reply

Back to Top