Adding a dynamic element filter

Contents[Hide]

1. Overview

A dynamic element filter allows viewers to choose the measure or hierarchy they want to see in a visualization via a drop down list, without any scripting.

2. Setup

For this example, a data cube will be used which exposes two measures (LineTotal, OrderQty) and three hierarchies (FirstName, OrderDate, Product). You can build a similar data cube yourself by following the steps in this article.

Data cube in Explore
Data cube in Explore

3. Dynamic measure

3.1. Add the dynamic element

In this example, we first create a new dashboard for this example from the main menu using the Blank template.

We drag the OrderDate hierarchy from Explore to the dashboard canvas. It will appear as a table visualization with the Data Analysis Panel beside it.

Drag OrderDate hierarchy to canvas
Drag OrderDate hierarchy to canvas

In the Data Analysis Panel, click the click to add link under Measures.

Click to add a measure
Click to add a measure

In the list of available measures to add, go to the Calculated Elements section and click <Dynamic Measure>.

Select Dynamic Measure
Select Dynamic Measure

The dynamic measure is added to the Data Analysis Panel and you can see that it is set to a default measure (OrderQty) in the table visualization.

Dynamic measure is added and set by default to OrderQty
Dynamic measure is added and set by default to OrderQty

To change the default dynamic measure, click the Dynamic Measure in the Data Analysis Panel to edit it.

In the configuration dialog, expand the Parameter Values section if needed and set the Dynamic Measure drop down list to the default that you want. For example, change it to LineTotal.

Change the default dynamic measure
Change the default dynamic measure

The table visualization now shows the LineTotal measure by default.

Default dynamic measure is now LineTotal
Default dynamic measure is now LineTotal

Alternatively, you can open the token menu to the right for Dynamic Measure and set the default to No Selection. This will cause the table visualization to not display any dynamic measure initially.

No Selection as the default
No Selection as the default

To determine the aggregator and formatting of each measure when it's selected dynamically, use a data cube as your data source (or promote the auto-generated one behind your metric set). The measure's supported aggregators and formatting settings in the data cube Process Result take effect, since the Data Analysis Panel will not be available in view mode after checking in. You could choose only one supported aggregator so that it always takes effect, and can set up distinct formatting for each measure.

3.2. Add the dynamic filter

The next step is to add a Dynamic Element filter to the dashboard to allow users to switch measures via a drop down list.

Select the table visualization on the canvas, click Filter in the toolbar, and then click Dynamic Element (found under More).

Add a dynamic element filter
Add a dynamic element filter

A dynamic element filter control is added to the canvas and the Filter Visualizations panel is opened automatically. The filter is already connected to the dynamic measure by default, so you can just close the panel.

Filter Visualizations panel
Filter Visualizations panel

Switch to View mode and use the filter drop down list to choose the measure you want to see in the table visualization. The filter's token menu can be used to switch the dynamic measure back to its default, or to No Selection.

Use the dynamic element filter to select your measure
Use the dynamic element filter to select your measure

If you hover over a table cell, the tooltip will show the caption and value of the current measure. This is possible because of special keywords [Dynamic Measure Caption] and [Dynamic Measure] which you can see in the Properties for the table column.

Tooltip uses dynamic measure keywords
Tooltip uses dynamic measure keywords

4. Dynamic hierarchy

4.1. Add the dynamic element

Adding a dynamic hierarchy is similar to adding a dynamic measure.

For this example, first create a new dashboard from the main menu using the Blank template.

We drag the OrderQty measure from Explore to the dashboard canvas. It will appear as a table visualization with the Data Analysis Panel beside it.

Drag OrderQty measure to canvas
Drag OrderQty measure to canvas

In the Data Analysis Panel, click the click to add link under Rows.

Click to add a row hierarchy
Click to add a row hierarchy

In the list of available hierarchies to add, go to the Calculated Elements section and click <Dynamic Hierarchy>.

Select Dynamic Hierarchy
Select Dynamic Hierarchy

The dynamic hierarchy is added to the Data Analysis Panel and you can see that it is set to a default hierarchy (FirstName) in the table visualization.

Dynamic hierarchy is added and set by default to FirstName
Dynamic hierarchy is added and set by default to FirstName

To change the default dynamic hierarchy, click the Dynamic Hierarchy in the Data Analysis Panel to edit it.

In the configuration dialog, click to expand Parameter Values if necessary and set the Element drop down list to the default that you want. For example, change it to Product instead.

Change the default dynamic hierarchy
Change the default dynamic hierarchy

The table visualization now shows a row for each Product by default.

Default dynamic hierarchy is now Product
Default dynamic hierarchy is now Product

4.2. Add the dynamic filter

The next step is to add a Dynamic Element filter to the dashboard to allow users to switch hierarchies via a drop down list.

Select the table visualization on the canvas, click Filter in the toolbar and then click Dynamic Element (found under More).

Add a dynamic element filter
Add a dynamic element filter

A dynamic element filter control is added to the canvas and the Filter Visualizations panel is opened automatically. The filter is already connected to the dynamic hierarchy by default so you can just close the panel.

Filter Visualizations panel
Filter Visualizations panel

Switch to View mode from the toolbar and use the filter drop down list to choose the hierarchy you want to see in the table visualization. The filter's token menu can be used to switch the dynamic hierarchy back to its default.

Use the dynamic element filter to select your hierarchy
Use the dynamic element filter to select your hierarchy

If you hover over a table cell, the tooltip will show the current hierarchy level and corresponding member. This is possible because of special keywords [Dynamic Hierarchy Level] and [Dynamic Hierarchy] which you can see in the Properties for the table column.

Tooltip uses dynamic hierarchy keywords
Tooltip uses dynamic hierarchy keywords

5. Properties

This section describes some of the key properties of a dynamic element filter that you can customize in the Properties window.

5.1. Shown elements

The list of available measures (or hierarchies) displayed by default in a dynamic filter may include measures or hierarchies that you don't want. Instead of modifying the underlying data cube you can control exactly which elements (measures or hierarchies) will appear in the filter from its Properties.

Under the Main properties for the filter, click the + button under Shown Elements. You'll see a checkbox list of available measures or hierarchies. Simply select the ones you want to appear in the dynamic filter.

Select the elements to appear in the filter
Select the elements to appear in the filter

5.2. Shown tokens

In a similar way, you can control which tokens you want to display in the filter's token menu via the Shown Tokens property. If you want to hide the token menu altogether, you can do so in the Look tab under Appearance.

Note
The No selection token option is not available for dynamic hierarchies.

5.3. Label text

Under Text properties, use the Label Text property to change the text that appears above the filter's dropdown.

Set the label text for the filter
Set the label text for the filter

6. Notes

  • Dynamic hierarchies and measures are not meant to replace editing a metric set for performing analysis, and have more limited filtering and sorting options. For other limitations, see Product Notes.

7. See also

Dundas Data Visualization, Inc.
400-15 Gervais Drive
Toronto, ON, Canada
M3C 1Y8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours:
Phone: 9am-6pm, ET, Mon-Fri
Email: 7am-6pm, ET, Mon-Fri