Site icon i2tutorials

Trend Lines in Tableau

You can show trend lines during a visualization to spotlight trends in your data. you’ll publish a view that contains trend lines, and you add trend lines to a deem you edit it on the online .

When you add trend lines to a view, you’ll specify how you would like them to seem and behave.
Add trend lines to a view
To add a line to a visualization:

Select the Analytics pane.

From the Analytics pane, drag line into the view, then drop it on the Linear, Logarithmic, Exponential, Polynomial, or Power model types.
About adding trend lines (and once you can’t add them)
To add trend lines to a view, both axes must contain a field which will be interpreted as variety for instance you can’t add a line to a view that has the merchandise Category dimension, which contains strings, on the Columns shelf and therefore the Profit measure on the Rows shelf. However, you’ll add a line to a view of sales over time because both sales and time are often interpreted as numeric values.

For multidimensional data sources, the date hierarchies actually contain strings instead of numbers. Therefore, trend lines aren’t allowed. Additionally, the ‘m/d/yy’ and ‘mmmm yyyy’ date formats on all data sources don’t allow trend lines.

If you’ve got trend lines turned on and you modify the view during a way where trend lines aren’t allowed, the trend lines don’t show. once you change the view back to a state that permits trend lines, they reappear.
Choose which fields to use as factors within the line model
For trend models that are considering multiple fields, you’ll eliminate specific fields as factors within the line model.

Often you’ll want to get rid of factors because you would like the line model to be supported the whole row within the table instead of choppy by the members or values of a field. Consider the subsequent example. The view below shows the monthly sales for various products categories, broken out by region.
Remove Trend Lines
To remove a line from a visualization, drag it off of the visualization area. you’ll also click a line and choose Remove.

To remove all trend lines from the view, select Analysis >Trend Lines >Show Trend Lines.
After you add trend lines, you’ll display statistics on the line for instance you’ll see the formula also as r-squared and p values. For more information on the model types and terms utilized in the descriptions, see the line Model Terms and line Model Types sections.
Trend Line Model Types
These model types are available for trend lines: Linear, Logarithmic, Exponential, Power, and Polynomial.

In the following formulas, X represents the explanatory variable, and Y the response variable.

Linear
With the linear model type the formula is:

Y = b0 + b1 * X

where b1 is that the slope and b0 is that the intercept of the road .

Logarithmic
With the logarithmic model type, the formula is:

Y = b0 + b1 * ln(X)

Because a logarithm isn’t defined for number but zero, any marks that the explanatory variable is negative are filtered before estimation of the model. Avoid employing a model that discards some data unless you recognize that the info being filtered out is invalid. The line description reports what percentage marks were filtered before model estimation.

Exponential
With the exponential model type, the formula is:

Y = exp(b0)* exp(b1 * X)

With an exponential model, the response variable is transformed by the natural log before estimation of the model therefore the marks plotted in your view are found by plugging in various explanatory values to seek out values of ln(Y).

ln(Y) = b0 + b1 * X

These values are then exponentiated to plot the line . What you see is that the exponential model within the following form:

Y = b2*exp(b1 * X)

Where b2 is that the value of exp(b0). Because a logarithm isn’t defined for numbers but zero, any marks that the response variable is negative are filtered before model estimation.

Power
With the facility model type, the formula is:

Y = b0 * X^b1

With an influence model, both variables are transformed by the natural log before estimation of the model leading to this formula:

ln(Y) = ln(b0) + b1 * ln(X)

These values are then exponentiated to plot the line .

Because a logarithm isn’t defined for numbers but zero, any marks that the response variable or explanatory variable is negative are filtered before model estimation.

Polynomial
With the polynomial model type, the response variable is transformed into a polynomial series of the required degree. The formula is:

Y = b0 + b1 * X + b2 * X^2 + …

With a polynomial model type, you want to also select a Degree between 2 and eight the upper polynomial degrees exaggerate the differences between the values of your data. If your data increases very rapidly, the lower order terms may have almost no variation compared to the upper order terms, rendering the model impossible to estimate accurately. Also, more complicated higher order polynomial models require more data to estimate. Check the model description of the individual trends line for a red warning message indicating that an accurate model of this sort isn’t possible.

Exit mobile version