Tableau 简明教程
Tableau - Date Calculations
日期是大多数数据分析场景中广泛使用的一个关键字段。因此,Tableau 提供了许多涉及到日期的内置函数。你可以进行简单的日期操作,例如添加或减去日期中的天数。你还可以创建涉及到日期的复杂表达式。
Dates are one of the key fields which is extensively used in most of the data analysis scenarios. Hence, Tableau provides a large number of inbuilt functions involving dates. You can carry out simple date manipulations such as adding or subtracting days from a date. You can also create complex expressions involving dates.
以下是创建计算字段并在其中使用日期函数的步骤。
Following are the steps to create a calculation field and use date functions in it.
Create Calculated Field
连接到样例超级商店时,转到分析菜单并单击“创建计算字段”,如下面屏幕截图所示。
While connected to Sample superstore, go to the Analysis menu and click ‘Create Calculated Field’, as shown in the following screenshot.
Calculation Editor
上述步骤将打开一个计算编辑器,其中列出了 Tableau 中可用的所有函数。你可以更改下拉值并仅查看与日期相关的函数。
The above step opens a calculation editor, which lists all the functions available in Tableau. You can change the dropdown value and see only the functions related to Date.