Use a button to apply a filter value

Contents[Hide]

1. Overview

This article shows you how to set up a filter interaction on a component that will cause a data control to be filtered when the component is clicked.

The following example is based on using a button but other non-data components such as labels will work just as well.

2. Create a new dashboard

For this example, create a new dashboard using the Blank template.

Drag a measure (OrderQty) and row hierarchy (Product) from a data cube to the dashboard canvas. You'll see a table visualization like the one below.

Create a new dashboard
Create a new dashboard

3. Add a view parameter

Go to the bottom of the dashboard designer and click Parameters.

In the Parameters window, click Add New

Add a new view parameter
Add a new view parameter

Connect the view parameter to the Product hierarchy from the table visualization.

Connect the view parameter
Connect the view parameter

4. Add a button component and set up filter interaction

Go to the toolbar, click Components, and then select Button. A button is added to the canvas.

Right-click (or long-tap) on the button and click Set Up Interactions. Then click Filter.

Click Filter
Click Filter

In the filter setup dialog, the View Parameter should already be set to viewParameter 1.

Click the Filter Value dropdown and select the filter value you want the button to apply.

Set up the filter
Set up the filter

5. View the dashboard

Switch to View mode to test the dashboard. Click the button to see the table visualization filtered to the value you selected during setup.

Click the button to filter the table
Click the button to filter the table

6. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

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