Tableau Playbook - 平滑漏斗图

发布日期:2026-07-11 11:25:03   来源 : 杭州电子商务研究院    浏览量 :5
杭州电子商务研究院 发布日期:2026-07-11 11:25:03  
5

介绍

这是Tableau Playbook - 漏斗图系列文章的第二部分。在第一部分中,我们深入探讨了概念以及如何构建基本的漏斗图。如果您错过了,请查看。

在本指南(第 2 部分)中,我们将逐步练习两个高级漏斗图:平滑漏斗图彩色平滑漏斗图

数据集

我从AnyChart中抓取了这个数据集“funnel_dataset_interview” 。它是关于面试和招聘的。该数据集记录了每个阶段的通过率,包括申请人力资源面试测试披露信息主管面试录用。您可以从我的 Github下载此数据集。

平滑漏斗图

随着块数的增多,基本的漏斗图很难表达清楚。为了让漏斗图看起来更优雅一点,我们可以对其进行平滑处理。

这次,我们使用第二个数据集“funnel_dataset_interview.csv”。

  1. 首先,我们建立一个面积图。

    平滑漏斗图 - 流程 1

    1. 选择“区域”作为标记类型。
    2. 将“Stage”拖到Rows Shelf中。
    3. 将“百分比”拖到列架中。
    4. 点击降序排序按钮,自动排序。
    5. 切换到整个视图以获得更好的可视化效果。
  2. 现在我们已经完成了漏斗图的一半。我们将通过复制和轴反转来创建另一半。

    1. 按住Control键( Mac 中为Command键)并将“SUM(Percentage)”拖到列架的右侧,这意味着制作副本。
    2. 我们需要镜像左边部分,因此我们右键单击左侧 x 轴并单击编辑轴...
    3. 编辑轴对话框中,选中“比例反转”选项。
    4. 可以看到左侧的左边距太窄,无法显示标签。我们可以Range选项中选择Fixed ,并将Fixed end 的值修改得更大一些。

    平滑漏斗图 - 流程 2

  3. 添加格式良好且信息丰富的标签:

    1. To show the difference percentage from the previous stage, we will create a Calculated Field "Percentage Diff". We can use LOOKUP function to access the previous stage. The complete formula is SUM([Percentage]) - LOOKUP(SUM([Percentage]), -1).

    2. Drag "Stage", "Percentage" and "Percentage Diff" into Marks - Label.

    3. Format both "SUM(Percentage)" and "Percentage Diff" as Percentage and set Decimal places to 0.

    4. Expand Label card and format labels. Click the button of Text and edit the label as:

      <Stage>
      <SUM(Percentage)>, <AGG(Percentage Diff)>
      

      Change the Font size and color separately. In order to highlight the decrease, we can choose red for the color.

    5. Format the Alignment: Set Horizontal as Left and Vertical as Middle.

    6. In order to hide the dividing line, we set the color to opaque. Switch to the All Marks, then expand Color card and slide the Opacity to 100%.

    平滑漏斗图 - 流程 3

  4. In the last step, let's polish this chart:

    1. Edit the title as "The Pass Rates of Interviewing".
    2. Right-click on both x-axis and y-axis and uncheck Show Header.
    3. Navigate to Format -> **Lines... **Set Grid Lines and Zero Lines to None.
    4. Navigate to Format -> **Borders... **Set Row Divider and Column Divider to None.

Here is the final chart:

Analysis:

Compared with the basic version, the smooth version looks more elegant, especially when the number of blocks increases. The smoothness of funnel chart edges allows us to judge the degree of reduction by slope.

Aided by the informative labels, especially the difference percentage from the previous stage, we can analyze the bottleneck more quantitatively. For example, we can see that, in the end, only 10% of candidates get Offer. The pass rate of Brief Interview by HR phase reduced the most.

Colored Smooth Funnel Chart

With the same color, we find it difficult to distinguish the partition line between areas. We can make it clearer by coloring.

  1. 首先,我们需要为每个阶段创建计算字段。以“应用”为例,我们输入公式为:

    如果 ATTR([阶段]) = "应用程序"
    或 LOOKUP(ATTR([Stage]), -1)="应用程序"
    然后 SUM([百分比]) 结束
    

    如果值等于当前或前一阶段,此公式将计算“百分比”的总和。

    彩色平滑漏斗图 - 流程 1

  2. 我们根据面积图来构建它。

    1. 将“测量值”拖到列架中。

    2. 删除其他措施,只保留我们刚刚创建的六个“阶段”字段。

    3. 将“Stage”拖到Rows Shelf中。

    4. 点击降序排序按钮,自动排序。

    5. 切换到整个视图以获得更好的可视化效果。

    6. 选择“测量值”中的所有字段。然后右键单击并选择“计算依据” ->“表格(向下)”

    7. 选择“区域”作为标记类型。

    8. 取消堆叠区域:导航至“分析” -> “堆叠标记” ->选择“关闭”

    9. 为了按“阶段”对区域着色,我们将“阶段”拖入标记-颜色

    彩色平滑漏斗图-流程 2

  3. 现在我们已经完成了漏斗图的一半。像之前一样,我们复制并镜像另一半。

    1. 按住Control键( Mac 中为Command键)并将“SUM(Percentage)”拖到其右侧进行复制。
  4. 右键单击左侧 x 轴,然后单击“编辑轴...”

    1. 选中比例反转”选项以进行镜像。
    2. 选择“固定范围选项并修改“固定结束”值以使左边距更大。

    彩色平滑漏斗图-流程 3

  5. 添加格式良好且信息丰富的标签。我们使用在上一个图表中创建的“百分比差异”来显示与上一阶段的差异百分比

    1. 将“阶段”、“百分比”和“百分比差异”拖到标记-标签中。

    2. 将“SUM(百分比)”和“百分比差异”的格式都设置为百分比,并将小数位数设置为 0。

    3. 展开标签卡,格式化标签。点击文本按钮,编辑标签如下:

      <阶段>
      <SUM(百分比)>,<AGG(百分比差异)>
      

      分别设置字体粗体和更改大小。

    4. 保持字体颜色与区域一致。展开“字体”窗格并选择“匹配标记颜色”

    5. 设置对齐格式:将水平对齐设置为左对齐,将垂直对齐设置为中间对齐

    6. 为了隐藏分界线,我们将颜色设置为不透明。切换到所有标记,然后展开颜色卡并将不透明度滑动到 100%。

  6. 进行最后的修饰:

    彩色平滑漏斗图-流程 4

    1. 将标题编辑为“面试通过率”。
    2. 右键单击 x 轴和 y 轴并取消选中“显示标题”
    3. 右键单击并选择隐藏空值指示器。
    4. 导航到格式->线条……将网格线零线设置为
    5. 导航到格式->边框……将行分隔符列分隔符设置为

最终图表如下:

分析

在平滑的漏斗图基础上,此图通过对区域进行着色来增强效果。现在我们可以清楚地区分区域之间的分割线。为了帮助观众理解,我们在区域和标签上保持颜色一致。

<font style="vertical-ali

以上内容来自杭州电子商务研究院推送
关注
关于我们
热门推荐
合作伙伴
免责声明:本站部分资讯来源于网络,如有侵权请及时联系客服,我们将尽快处理
Copyright © 2025-2027 ToB产业网址导航 公安备案 浙公网安备33010602013138号 浙ICP备16025413号-9
支持 反馈 关注 数据