View Parameters

From Explore Analytics: The Wiki
Jump to navigation Jump to search

Introduction

View Parameters provide a mechanism to control the data in a view. For example, a “department” parameter can be used to restrict the view to only show data for the requested department.

Note: The functionality described on this page is only available with an Enterprise Plus subscription.

Two steps are required in order to pass a parameter to a view:

  • The view needs to have a View Parameter
  • A parameter value must be provided. The parameter value can be provided as part of the view URL or by making a selection using a dashboard Slicer.

Slicers and View Parameters

A Slicer is a user-interface component that allows the user to select a parameter value. That value is then passed to any view on the dashboard that has a corresponding parameter. For example, a Slicer can allow the user to select a department and a view on the same dashboard could have a department parameter. This pairing means that when the user selects a department, the view will be updated to show data for that department.

Adding a View Parameter

Before you can pass a parameter to your view, you need to add a View Parameter to your view. If your view is a mashup or a scorecard, you’ll need to add a View Parameter to the input views of your mashup or scorecard.

To add a parameter to the view, select “Parameters” from the “File” menu. A view can have multiple parameters, and the following dialog allows you to add, edit, and remove parameters.

View parameters.png

To add a parameter, use the “Add...” button. The Add View Parameter dialog is displayed.

Add view parameter.png

The parameter works by restricting data such that data included only if the field matches the parameter value. Therefore, you need to select a field.

If the field that you select is a date/time field, you’ll also be prompted for date grouping (“Grouped by”). Here you can group the date to select a year, for example. For no grouping, select “Exact time”.

Next, specify a Parameter Name.

Parameter Name

Parameters are keyed by name. For our department parameter example, the name of the parameter may simply be “department”. Parameter names are not case sensitive.

Parameter Value

If a parameter value is not supplied, for example if the parameter is not present in the URL and there’s no slicer matching the parameter, then the parameter is ignored and it does not limit data selection.

Providing a Parameter Value in the URL

The following example shows an example of what a URL would look like with a department parameter:

https://my.exploreanalytics.com/pub/view/xxxx?department=human%20resources

In this example, the URL has a parameter, “department”, with a value of “Human Resources” (the space in the value is encoded as %20)

Providing a Parameter Value using a Slicer

A Slicer is added to a dashboard. The slicer has a Parameter Name of “department”. The slicer has a selection of department names. To learn more about creating a slicer see the Slicer page.

Slicer usage.png