Difference between revisions of "View Parameters"

From Explore Analytics: The Wiki
Jump to navigation Jump to search
(Created page with " {{Template:TOC|Dashboard|Slicer}}")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==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.
 +
 +
[[File:view_parameters.png]]
 +
 +
To add a parameter, use the “Add...” button. The Add View Parameter dialog is displayed.
 +
 +
[[File: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.
 +
 +
==Allow Multiple Selection==
 +
 +
A parameter (except for a date/time field) can allow multiple values to be passed to select multiple values in the report. This is equivalent to a filter with the IN operator (e.g., Department IN "sales","human resources"). If you allow multiple selection, passing a single value is okay, but if it contains a comma, it must be enclosed in double quotes. If you intend to use this parameter in a slicer that allows multiple selection, then this parameter must allow multiple selection.
 +
 +
==Parameter Value==
 +
 +
Parameter value is supplied when the view is run, in one of the two ways described below.
 +
 +
If a parameter value is omitted, 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:
 +
 +
<code><nowiki>https://my.exploreanalytics.com/pub/view/xxxx?department=human%20resources</nowiki></code>
 +
 +
In this example, the URL has a parameter, “department”, with a value of “Human Resources” (the space in the value is encoded as %20)
 +
 +
If the parameter allows multiple selection, then a URL might look like this:
 +
 +
<code><nowiki>https://my.exploreanalytics.com/pub/view/xxxx?department="sales","human%20resources"</nowiki></code>
 +
 +
===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 | Slicer page]].
 +
 +
[[File:slicer_usage.png]]
 +
 +
==Composite Views==
 +
 +
Parameters that are passed to composite views are also handed to their input view. This allows for greater efficiency as the input view can filter data based on the parameter.
  
 
{{Template:TOC|Dashboard|Slicer}}
 
{{Template:TOC|Dashboard|Slicer}}

Latest revision as of 19:30, 20 September 2018

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.

Allow Multiple Selection

A parameter (except for a date/time field) can allow multiple values to be passed to select multiple values in the report. This is equivalent to a filter with the IN operator (e.g., Department IN "sales","human resources"). If you allow multiple selection, passing a single value is okay, but if it contains a comma, it must be enclosed in double quotes. If you intend to use this parameter in a slicer that allows multiple selection, then this parameter must allow multiple selection.

Parameter Value

Parameter value is supplied when the view is run, in one of the two ways described below.

If a parameter value is omitted, 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)

If the parameter allows multiple selection, then a URL might look like this:

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

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

Composite Views

Parameters that are passed to composite views are also handed to their input view. This allows for greater efficiency as the input view can filter data based on the parameter.