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即学即用
309
分析计算
34
-
12
:设置行号随时间增加
这里行号随着订单日期值的增加而递增(见图
34-13
)。
34
-
13
:行号计算结果
ROW_NUMBER()
函数可以帮助你在做比较复杂的清理任务时对数据进行排序,使其更
容易分析。
34.3
应用案例
Prep
中,有许多应用案例可以从分析计算中受益。本节将只介绍几个例子。
34.3.1
筛选前
N
条记录
Prep Builder
的早期版本中,创建“
Top N
”(前
N
个)过滤器是一个相当困难的
问题。对数据进行排名涉及复杂的自连接和棘手的连接条件。现在,排名功能可以
通过过滤轻松生成“
Top N
”的记录列表。让我们回到之前的子类别销售排名,并
将其过滤到仅按销量排名的前
5
个子类别(见图
34-14
)。
310
34
34
-
14
:计算前
5
名的排名
这里只返回
Top 5
(排名前
5
)的值(见图
34-15
)。
34
-
15
:应用 Top
5
过滤器后的结果数据集
34.3.2
过滤掉一定比例的数据
使用与排名
Top 5
类似的技术,可以设置希望返回数据集中的多少内容(基于数据
中的一个值)。如果数据量(在本例中为
Sub-Category
子类别)会随着时间的推移
而增加,但你仍然希望返回相同尺寸的样本,那么这是一种有用的技术(见图
34-
16
)。
34
-
16
:计算一个排名以返回一个百分比的数据 ...
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