Skip to Content
实用 Tableau
book

实用 Tableau

by Ryan Sleeper
May 2025
Intermediate to advanced
624 pages
7h 35m
Chinese
O'Reilly Media, Inc.
Content preview from 实用 Tableau

第 42 章 如何制作帕累托图表 如何制作帕累托图表

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

帕累托图表以维尔弗雷多-帕累托(Vilfredo Pareto,80-20 的代表人物!)命名 ,是一种双轴组合图表,用于突出对相关测量影响最大的维度成员。 在主轴上,条形图用于显示每个维度成员的原始数量,按降序排序。在次坐标轴上,使用折线图以百分比的形式显示累计总数。 虽然这种图表类型有多种用途,但它是质量控制七种基本工具的一部分,传统上用于识别累计总数的最大贡献者和改进机会。

如何在 Tableau 中制作帕累托图表

在坚持质量控制的情况下,本教程将使用 "样本 - 超级市场 "数据集来查看哪些产品子类别的退货项目最多。最终的图表将如下所示:

prta 4201

与《实用 Tableau》的其他内容一样,您可以使用每次下载 Tableau 时附带的示例 - 超级市场数据进行学习。 不过,本教程要求我额外采取两个步骤来准备数据:

  1. 左连接 Returns 表和 Orders 表。

    为此,请右键单击样本超级市场数据连接并选择 "编辑数据源"。 这时会出现一个新界面,可以把退货表拖到订单表旁边,并根据订单 ID 设置左连接:

    prta 4202
  2. 创建一个计算字段,计算返回次数。

    计算公式为 COUNT([已返回] = "是"):

    prta 4203

    现在我们准备绘制帕累托图表。首先,创建一个条形图,查看每个产品子类别的退货数量,并按降序排序:

    prta 4204
  3. 接下来,创建双轴组合图表,方法是将 "数据 "窗格中 "测量 "区域的 "返回值 "拖到右轴上, ,将主轴的标记类型改回 "条形图",并将辅助轴的标记类型更改为 "线形图"。有关创建此类图表的复习,请参阅第 21 章。此时,可视化效果将与下面相似:

    prta 4205
  4. 现在是使其成为帕累托图表的步骤。我们将在第二个退货丸中添加一个表格计算和一个辅助表格计算,以显示各产品子类别的累计退货百分比。 要添加第一个表格计算,请单击第二个退货丸,将鼠标悬停在 "快速表格计算 "上,然后选择 "运行总计"。有了运行总计的表格计算,就可以在结果上添加第二个表格计算。这样,我们就可以计算出每个产品子类别的原始运行总数,然后添加二次计算来确定累计总数的百分比。要添加二次表格计算,请再次单击第二个退货丸,选择 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

数据科学实战手册(R+Python)(第2版)

数据科学实战手册(R+Python)(第2版)

Posts & Telecom Press, Prabhanjan Narayanachar Tattar, Tony Ojeda, Sean Patrick Murphy, Sean P Murphy, Benjamin Bengfort, Bengfort Benjamin, ABHIJIT DASGUPTA
Python数据分析(第2版)

Python数据分析(第2版)

Posts & Telecom Press, Armando Fandango

Publisher Resources

ISBN: 9798341657137