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即学即用
69
处理日期问题
季度。
月份。
星期。
日。
年中的某日。
工作日。
财政年度。
财政季度。
财政月。
公共假期。
周末。
这一点很重要,因为在使用未内置日期解析功能的工具时,必须加入所有相关的列
来挑选出你分析所需的日期部分(更不用说数据库管理员要保持表格的更新了)。
Tableau
的所有产品都非常灵活地使用了日期字段,以快速获取想要分析的数据部分,
无论是一年的周数还是工作日的信息。这意味着不需要将所有的日期部分单独存储
为单独的列。如果将日期组织成单列,那么在
Desktop
中的分析就会容易得多,因
为无论想使用哪种日期部分,都是将同一个字段添加到视图中。这样就可以灵活地
通过不同的日期部分解析方法来分析数据,而不必在分析中不断地交换数据字段。
8.4
新纪元日期
UNIX epoch dates
(新纪元日期)是一种常见于数据集的日期格式,但对普通人来
说,乍一看会觉得摸不着头脑。由于整数(整个数字)比长字符串更容易在数据库
中存储,新纪元日期反映了自
1970
1
1
00:00:00
UTC/GMT
)以来已经过
去的秒数,不计算闰秒。例如,我们的示例日期
25/09/2019
的午夜将对应于一个值
1569369600
的数。
许多数据准备从业人员面临的困难是,如何将这种格式转换为现代
BI
工具中可使用
的形式。在
Tableau
中,你可以使用
dateadd()
函数(见图
8-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