Tableau 简明教程

Tableau - Top Filters

Tableau 筛选器中的首要选项用于限制筛选器的结果集。例如,从销售额的众多记录中,您只想获取前 10 个值。您可以使用内置选项通过多种方式限制记录或通过创建公式来应用此筛选器。在本章中,您将探索内置选项。

The Top option in Tableau filter is used to limit the result set from a filter. For example, from a large set of records on sales you want only the top 10 values. You can apply this filter using the inbuilt options for limiting the records in many ways or by creating a formula. In this chapter, you will explore the inbuilt options.

Creating a Top Filter

使用示例超级商店,找出代表销售额前五名的产品的子类别。要实现此目标,请执行以下步骤。

Using the Sample-superstore, find the sub-category of products which represents the top 5 sales amount. To achieve this objective, following are the steps.

Step 1 - 将维度子类别拖到行架和度量销售到列架。选择水平条形图作为图表类型。Tableau 将显示以下图表。

Step 1 − Drag the dimension Sub-Category to the Rows shelf and the Measure Sales to the Columns shelf. Choose the horizontal bar as the chart type. Tableau shows the following chart.

tio filter 1

Step 2 - 右键单击字段子类别,然后转到名为“顶部”的选项卡。在此,按字段选择第二个单选按钮。从下拉列表中选择按总销售额排名前 5 的选项。

Step 2 − Right-click on the field Sub-Category and go to the tab named Top. Here, choose the second radio option by field. From the drop-down, choose the option Top 5 by Sum of Sales.

tio filter 2

完成上述步骤后,您将获得以下图表,其中显示了按销量排名前 5 的产品子类别。

On completion of the above step, you will get the following chart, which shows the top 5 Sub-Category of products by sales.

tio filter 3