Time series analysis

Calculations in Tableau

Maarten Van den Broeck

Content Developer at DataCamp

Seasonality and year-over-year analysis

White spacing

Study of repetitive patterns in data

  • Detect predictable trends
  • Determine high and low seasons
  • Improve forecasting decisions

White spacing

Year-over-year comparison:

  • Comparison of results per discrete date intervals (e.g., months) across various years.

White spacing

Seasonality of cinema visits, year-over-year:

A line chart presenting seasonality of cinema visits

Calculations in Tableau

Year-to-date and custom fiscal years

Year-to-date (YTD):

  • A Quick Table Calculation
  • Calculates from the start of the year to the last known data point in that year
  • Also possible as MTD, QTD etc.

White spacing

Custom Fiscal Year

  • Built-in date property
  • Possible to work with various year types in one workbook

White spacing

Bar chart presenting Year-To-Date sales

A bar chart presenting sales by custom Fiscal Year

Calculations in Tableau

Calculating growth

Year over Year Growth :

  • A Quick Table Calculation
  • Comparing change in a measure to the same period last year (e.g. Q1'19 to Q1'18)
  • Requires discrete date dimensions

Calculation behind YoY growth:

A formula behind growth calculation

  • Table (down) calculation

Year over Year Growth in Tableau:

An example of an Year over Year growth calculation

Calculations in Tableau

Compound Annual Growth Rate - CAGR

CAGR - mean annual growth rate of a measure over a specified period of time longer than one year (1)

A dual visualization with bar chart and line chart, presenting Sales and CAGR calculations

CAGR as a mathematical calculation:

CAGR formula

White spacing

CAGR in Tableau:

Example of CAGR formula in Tableau

1 https://www.investopedia.com/investing/compound-annual-growth-rate-what-you-should-know/
Calculations in Tableau

Moving (rolling) calculations

  • Calculations across a specified number of values before and/or after the determined point in time
  • Used for smoothing fluctuations in data
  • Used for the long-term trends ("The Big Picture")

Smoothing fluctuations with moving average

A chart with daily sales

Calculations in Tableau

Moving (rolling) calculations

  • Calculations across a specified number of values before and/or after the determined point in time
  • Used for smoothing fluctuations in data
  • Used for the long-term trends ("The Big Picture")

  • E.g., moving AVG(Sales) over the last 180 days

white spacing

Tableaus formula calculation

Smoothing fluctuations with moving average

A dual chart with daily sales and a moving 180 day average of daily sales

Calculations in Tableau

Keeping it organized

Visualizing complex calculations:

  • Combine a set of time-series visualizations into a dashboard
  • Work with parameters and highlighters
  • Hide extra information (e.g. formula definition) in a tooltip
  • Use Dual Axis sparingly with clear axis names

Example of a time-series dashboard

An example of a dashboard

1 https://www.tableau.com/products/accelerators
Calculations in Tableau

Let's practice!

Calculations in Tableau

Preparing Video For Download...