Skip to Content
Tableau Prep即学即用
book

Tableau Prep即学即用

by Carl Allchin
August 2022
Beginner to intermediate
463 pages
9h 22m
Chinese
China Electric Power Press Ltd.
Content preview from Tableau Prep即学即用
335
37
使用更智能的过滤
23
章中介绍了过滤的基础知识,但过滤并不一定意味着只是手动点击或设置日期
范围来指定哪些数据应该包含在输出中。计算、合并和度量百分比的差异,都可以
让过滤操作更智能、更自动化。在数据准备阶段减少手工工作,可以降低出错的风险,
并使数据集发布后更容易与他人共享。
37.1
计算
所有计算都可以作为触发过滤器的方法。然而,某一些类型的计算比其他类型的计
算更经常地被用作过滤器。
37.1.1
布尔计算
测试数据字段中的值是否满足条件(例如,如果一个值超过了逻辑限制)是清理
数据和删除不想要的记录的好方法。在如图
37-1
所示的例子中,我们知道
Percent
Complete
(完成度)不能超过
100%
,所以我们在
Prep
中使用布尔过滤计算,通过
删除任何超过
1
的值来确保该值为
1
或更少。
37
-
1
:将 Percent Complete(完成度)度限制在
100
%
336
37
需要记住,百分比通常设置为
0
1
之间的值,而不是
0
100
之间的值,因为这
有助于统一
Tableau Desktop
中的数值格式。
37.1.2
逻辑计算
IF
CASE
计算可能会包含相当复杂的逻辑,可以通过在多个数据字段中匹配某些
场景,使过滤变得更容易。在图
37-2
中的体育数据集中,我们希望只返回其中一支 ...
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

深度学习:核心原理与案例分析

深度学习:核心原理与案例分析

Posts & Telecom Press, Ahmed Menshawy
Python金融实战

Python金融实战

Posts & Telecom Press, Yuxing Yan
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu
HBase管理指南

HBase管理指南

Posts & Telecom Press, Yifeng Jiang

Publisher Resources

ISBN: 9787519864439