Tableau 简明教程

Tableau - Trend Lines

趋势线用于预测变量特定趋势的延续。它还有助于通过同时观察两个变量中的趋势来识别两个变量之间的相关性。有许多数学模型用于建立趋势线。Tableau 提供了四个选项。它们分别是线性、对数、指数和多项式。本章仅讨论线性模型。

Trend lines are used to predict the continuation of a certain trend of a variable. It also helps to identify the correlation between two variables by observing the trend in both of them simultaneously. There are many mathematical models for establishing trend lines. Tableau provides four options. They are Linear, Logarithmic, Exponential, and Polynomial. In this chapter, only the linear model is discussed.

Tableau 采用时间维度和度量字段来创建趋势线。

Tableau takes a time dimension and a measure field to create a Trend Line.

Creating a Trend Line

使用 Sample-superstore,找出明年销售额度量值趋势。要实现此目标,请执行以下步骤。

Using the Sample-superstore, find the trend for the value of the measure sales for next year. To achieve this objective, following are the steps.

Step 1 - 将维度订单日期拖到列栏,将度量销售拖到行栏。选择图表类型为折线图。在分析菜单中,转到模型 → 趋势线。单击趋势线将弹出一个选项,显示可添加的不同类型的趋势线。选择线性模型,如下面屏幕截图所示。

Step 1 − Drag the dimension Order date to the Column shelf and the measure Sales to the Rows shelf. Choose the chart type as Line chart. In the Analysis menu, go to model → Trend Line. Clicking on Trend Line pops up an option showing different types of trend lines that can be added. Choose the linear model as shown in the following screenshot.

trend line 1

Step 2 - 完成上述步骤后,你将获得各种趋势线。它还显示字段之间相关性的数学表达式、P 值和 R 平方值。

Step 2 − On completion of the above step, you will get various trend lines. It also shows the mathematical expression for the correlation between the fields, the P-Value and the R-Squared value.

trend line 2

Describe the Trend Line

右键单击图表,然后选择描述趋势线选项以获取趋势线图表の詳細说明。它显示了系数、截距值和方程。这些详细信息还可以复制到剪贴板并在进一步分析中使用。

Right-click on the chart and select the option Describe Trend Line to get a detailed description of the Trend Line chart. It shows the coefficients, intercept value, and the equation. These details can also be copied to the clipboard and used in further analysis.

trend line 3