Chapter 8. Filters and Actions

Dashboard filters and actions in Tableau Public enable users to precisely select the information that they would like to explore, which is powerful. Selecting what's interesting makes a data story personal and relevant to users; all of this is done without shifting their attention or their mouse away from the dashboard. Filters and actions create true interactivity. They also give you, as an author, the ability to connect disparate sources of data or web pages to complete user experience.

In this chapter, we will discuss the following topics:

  • Adding and using Quick Filters
  • Filtering the Data sources with parameters
  • Filtering the Data sources with controller worksheets
  • Highlighting actions
  • Action Filters
  • URL Actions

Adding and using Filters

Filters are designed to meet several needs of your users; the following are some of these needs:

  • Limiting the scope of an analysis
  • Allowing users to view only what interests them
  • Removing outliers

Using a filter to limit the data that is extracted into your workbook improves the performance of the workbook. However, the following are the two disadvantages of using filters on dashboards:

  • Using many filter actions with multiple Dimension members can slow down a dashboard's performance.
  • Filters can be applied to only one data source at a time. So, in case multiple data sources are being used on one dashboard, you'll need to use parameters or controller worksheets to filter all of them.

In this chapter, we will use the dashboard that we created in the previous chapter. You can download the finished product by visiting https://public.tableau.com/views/Chaper7-Dashboards/CO2EmissionsDashboard?:embed=y&:display_count=yes&:showTabs=y. The dashboard uses only one data source at this point. As we progress through this chapter, we'll add another dashboard along with a fourth visualization.

Adding Filters to worksheets

In the dashboard that we are using, we have already filtered the map to show only the data for 2008, which is a blue pill on the Filters shelf, because it is a discrete number. You will also see that there are green pills for Latitude and Longitude. Both of these pills are continuous numbers, and they are included on the Filters shelf because we filtered out the null values, as shown in the following screenshot:

Adding Filters to worksheets

If a field is not already on the Filters shelf, you can drag it there from the Data window. Alternatively, you can create a Quick Filter by right-clicking on it in the Data window and selecting Show Quick Filter, as shown in the following screenshot. Tableau Public will then display the Quick Filter on the upper right-hand side of the workspace, but you can easily move it around the worksheet, as shown in the following screenshot:

Adding Filters to worksheets

For instance, if a field is a part of a visualization and it's on the Rows or Columns shelf, the Marks card, or anywhere else, you can click on its Context menu and select Filter.

There is a catch to adding filters. If a field is not on the Filters shelf of a worksheet, you won't be able to add it as a filter on the dashboard. In the following screenshot, we navigated to the worksheet in the workbook that has the map on it and added the filter there. In the next section of this chapter, we will go back to the dashboard and add the Quick Filter.

To add a Quick Filter for Region, perform the following steps:

  1. Right-click on Region in the Data window.
  2. Click on Show Quick Filter.
  3. Then, it's time to make a selection. With a discrete field such as Region, you will see the dimension members that you can choose. The Filters dialog box is shown in the following screenshot:
    Adding Filters to worksheets
  4. In the General tab, we can perform the following operations, as shown in the preceding screenshot:
    • Select from list (A): This uses either a custom list of values, or all the values.
    • The search box (B): We can search for a text string that is present in a dimension member.
    • Checkboxes (C): Click on the checkboxes next to the dimensions that we want to keep or exclude.
    • The filter (D): This sets the filter to show fewer values, which means that it shows the values that are automatically limited by the selections of other filters, and it doesn't show all the discrete values in the field.
    • All or None (E): You can select All or None, as required.
    • Exclude (F): This excludes the values that we have selected. If you are excluding values, be careful when exposing the filter to users. They might need some extra instructions about what the exclusion means and how to use it.
    • Summary (G): This shows a summary of your selection.
    • Reset (H): This resets all values.
    • OK, Cancel, and Apply (I): Click on Apply and then on the OK button to filter and set worksheet.
  5. In our example, we selected all the values and then deselected Aggregates.
  6. Then, we clicked on OK.

The pill for Region (which is blue because it's a discrete field) is now in the Filters shelf. When you go back to the dashboard, you can add it to the worksheet.

The other Filter tabs allow you to further specify the members that you want to retain or exclude in the analysis. You can perform the following operations:

  1. Establish the conditions that need to be met
  2. Use formulas to determine the members that you want to include
  3. Include the top or bottom members by a certain metric

This works particularly well in graphs other than maps because users are often only concerned with the best and worst performers.

Adding Quick Filters to a dashboard

If your worksheet is already on the dashboard, the new filter will not appear there automatically. The dashboard is laid out in a vertical column for the most part, and we do not have filters on it. Its top looks like the following screenshot:

Adding Quick Filters to a dashboard

We want to add the Region Quick Filter to the dashboard and then apply it to the other worksheets on the dashboard. When we add a filter (or a legend) to a dashboard that we have arranged very specifically, Tableau Public will automatically add a vertical layout container on the far right. Don't be alarmed by this. You can move filters and legends to the locations you want them to be in.

If a field is already a part of a visualization that is on a dashboard because it is one of the fields that is being displayed on the Detail or Tooltip shelves, you can add it to the dashboard by clicking on the Context menu for the visualization and then selecting it from the list of the Quick Filter options.

In the next few exercises, we will discuss the following topics:

  • Adding the Region Quick Filter to the dashboard
  • Formatting it to be a drop-down list
  • Setting it to show only the relevant values
  • Applying it to all the worksheets on the dashboard
  • Moving it so that it's in the same container as that of the title of the dashboard

In order to add and modify the Quick Filter, perform the following steps:

  1. Select the map worksheet on the dashboard by either clicking on the ocean in the map, or selecting it from the list of worksheets in the Dashboard menu to the left of the dashboard.
  2. Click on the Context menu.
  3. Hover the pointer of the mouse over the Quick Filters and click on Region, as shown in the following screenshot:
    Adding Quick Filters to a dashboard
  4. The Region filter will appear in a Vertical Layout Container to the far right of the dashboard. We'll move it later. It's important to be mindful of unused white space.
  5. Now, we will change the format of the quick filter. There are many options, and we want the most compact one, which is a multi-select drop-down list. Click on the Context menu of the filter and change it to show Multiple Values (Dropdown).
  6. There are many other modifications that we can make by clicking on the Context menu of the filter. Click on the Context menu again.
  7. Click on Only Relevant Values so that it shows only the Regions that meet the conditions of the other filters.
  8. Apply it to the other worksheets on the dashboard that are using the same data source. From the Context menu, click on Apply to Worksheets.
  9. In the Apply Filter to the Worksheets [Region] dialog box, click on All on Dashboard, as shown in the following screenshot, and then click on OK. Keep in mind that this only applies Quick Filters to worksheets using the same data source:
    Adding Quick Filters to a dashboard

The other modifications that you can make from the Context menu of the filter and which add polish and specificity to your dashboard, are as follows:

  • Applying Quick Filters to worksheets allows authors to select the sheets to which the filter applies, where all the worksheets are using the same data source
  • Formatting Quick Filters gives authors control over the font faces and styles used in the title and the list of values
  • Customizing Quick Filters can remove or show the All option
  • Showing, hiding, or editing the title can prompt users to take action
  • Changing the display of the filter, whether it's radio buttons for short lists or multiple value drop-down lists for longer lists, enables authors to select the best format for both the data and consumers
  • Showing relevant values, also known as cascading filters, is a great way of simplifying the filtering experience for consumers so that selections in a filter determine the contents of another

Formatting the filter box so that it has a floating or fixed width is another feature that gives authors control over the appearance of worksheet.

Moving the Quick Filter

The quick filter is still present in the vertical container to the right that Tableau Public automatically created for it. If you have several Quick Filters and Legends, it's perfectly fine to leave them in the container. Just be conscious of how you are using white space.

We plan to add a parameter later, but for now, we want to put this quick filter next to the title for the dashboard. The title is in a horizontal layout container already, which means that we can put other objects next to it.

  1. In order to drag the Quick Filter into the same horizontal layout container with the title, select the Quick Filter by clicking on it.
  2. Hover the pointer of the mouse over the center of the Quick Filter. You can click on the area with the white hashes, which is outlined by a red box, as shown in the following screenshot:
    Moving the Quick Filter
  3. When you get the white crosshair mouse, click on it and drag the filter into the horizontal layout container shared by the title for the dashboard. You will know that it is in the right place when the right border of the container has a shadow, as shown in following screenshot, and emphasized by the red box, as shown in the preceding screenshot:
    Moving the Quick Filter
  4. Note that the Vertical Layout Container has disappeared on its own.
  5. Change the filter values and see how the dashboard display changes.

In the following screenshot, the changes that we made to the Region filter were applied to the other worksheets to which we had applied the filter (which included all the worksheets on the dashboard):

Moving the Quick Filter
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset