Tableau 简明教程

Tableau - Filter Operations

任何数据分析和可视化工作都需要对数据进行广泛筛选。Tableau 提供各种筛选选项来满足这些需求。有很多内置函数用于使用维度和度量对记录应用筛选。度量的筛选选项提供了数字计算和比较。维度的筛选选项提供从列表中选择字符串值或使用自定义值列表。在本章中,你将了解各种选项以及编辑和清除筛选的步骤。

Any data analysis and visualization work involves the use of extensive filtering of data. Tableau has a very wide variety of filtering options to address these needs. There are many inbuilt functions for applying filters on the records using both dimensions and measures. The filter option for measures offers numeric calculations and comparison. The filter option for dimension offers choosing string values from a list or using a custom list of values. In this chapter, you will learn about the various options as well as the steps to edit and clear the filters.

Creating Filters

通过将所需字段拖到标记卡上方筛选器面板中,可以创建筛选器。通过将度量销售额拖到列面板和维度子类别拖到行面板中,创建水平条形图。再次将度量销售额拖到筛选器面板中。创建此筛选器后,右键单击并从弹出菜单中选择编辑筛选器选项。

Filters are created by dragging the required field to the Filters shelf located above the Marks card. Create a horizontal bar chart by dragging the measure sales to the Columns shelf and the dimension Sub-Category to the Rows shelf. Again drag the measure sales into the Filters shelf. Once this filter is created, right-click and choose the edit filter option from the pop-up menu.

Editing filter

Creating Filters for Measures

度量是数字字段。因此,此类字段的筛选器选项涉及选择值。Tableau 为度量提供了以下类型的筛选器。

Measures are numeric fields. So, the filter options for such fields involve choosing values. Tableau offers the following types of filters for measures.

  1. Range of Values − Specifies the minimum and maximum values of the range to include in the view.

  2. At Least − Includes all values that are greater than or equal to a specified minimum value.

  3. At Most − Includes all values that are less than or equal to a specified maximum value.

  4. Special − Helps you filter on Null values. Include only Null values, Non-null values, or All Values.

以下工作表显示了这些选项。

Following worksheet shows these options.

Adding filter measure

Creating Filters for Dimensions

维度是不包含字符串值的描述性字段。Tableau 为维度提供了以下类型的筛选器。

Dimensions are descriptive fields having values which are strings. Tableau offers the following types of filters for dimensions.

  1. General Filter − allows to select specific values from a list.

  2. Wildcard Filter − allows to mention wildcards like cha* to filter all string values starting with cha.

  3. Condition Filter − applies conditions such as sum of sales.

  4. Top Filter − chooses the records representing a range of top values.

以下工作表显示了这些选项。

Following worksheet shows these options.

Adding filter dimension

Clearing Filters

可以通过选择清除筛选器选项轻松删除筛选器,如下图所示。

Filters can be easily removed by choosing the clear filter option as shown in the following screenshot.

Clear filter