Tableau 简明教程

Tableau - Waterfall Charts

瀑布图有效地显示顺序正负值的累积效应。它显示了值从哪里开始、结束以及如何递增到达那里。因此,我们能够看到连续数据点之间变化的大小和值的差异。

Waterfall charts effectively display the cumulative effect of sequential positive and negative values. It shows where a value starts, ends and how it gets there incrementally. So, we are able to see both the size of changes and difference in values between consecutive data points.

Tableau 需要一个维度和一个度量来创建瀑布图。

Tableau needs one Dimension and one Measure to create a Waterfall chart.

Creating a Waterfall Chart

使用 Sample-superstore,计划查找每个产品子类的销售额变化。要实现此目标,请执行以下步骤。

Using the Sample-superstore, plan to find the variation of Sales for each Sub-Category of Products. To achieve this objective, following are the steps.

Step 1 - 将维度子类别拖到“列”栏架中,将度量值销售额拖到“行”栏架中。按照递增的销售值对数据进行排序。为此,在将鼠标悬停在垂直轴中部时,使用显示在该轴中间的排序选项。完成此步骤后,将出现以下图表。

Step 1 − Drag the Dimension Sub-Category to the Columns shelf and the Measure Sales to the Rows shelf. Sort the data in an ascending order of sales value. For this, use the sort option appearing in the middle of the vertical axis when you hover the mouse over it. The following chart appears on completing this step.

water fall 1

Step 2 - 接下来的,右键单击“总和 (销售额)”值,并从表格计算选项中选择“运行总计”。将图表类型更改为“甘特条形图”。将出现以下图表。

Step 2 − Next, right-click on the SUM (Sales) value and select the running total from the table calculation option. Change the chart type to Gantt Bar. The following chart appears.

water fall 2

Step 3 - 创建一个名为 -sales 的计算字段,并为此计算字段的值提及以下公式。

Step 3 − Create a calculated field named -sales and mention the following formula for its value.

water fall 3

Step 4 - 将新创建的计算字段 (-sales) 拖到“标记”卡下的“大小”栏架中。上面的图表现在更改为生成以下图表,即瀑布图。

Step 4 − Drag the newly created calculated field (-sales) to the size shelf under Marks Card. The chart above now changes to produce the following chart which is a Waterfall chart.

water fall 4

Waterfall Chart with Color

接下来,通过将销售额度量值拖到“标记”卡下的“颜色”栏架中,为图表中的条形图赋予不同的色调。您将获得有颜色的以下瀑布图。

Next, give different color shades to the bars in the chart by dragging the Sales measure to the Color shelf under the Marks Card. You get the following waterfall chart with color.

water fall final