0
0
Tableaubi_tool~8 mins

Rolling period calculations in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Rolling period calculations
Business Question

How have sales changed over the last 3 months compared to previous months? This dashboard helps track recent sales trends using rolling 3-month totals.

Sample Data
MonthSales
2024-01100
2024-02150
2024-03200
2024-04180
2024-05220
2024-06210
Dashboard Components
  • KPI Card: Rolling 3-Month Sales Total (Latest Month)
    Formula: WINDOW_SUM(SUM([Sales]), -2, 0)
    Explanation: Sums sales for the current month and previous 2 months.
    Value for 2024-06: 220 + 210 + 180 = 610
  • Line Chart: Monthly Sales and Rolling 3-Month Total
    Measures:
    - Monthly Sales: SUM([Sales])
    - Rolling 3-Month Total: WINDOW_SUM(SUM([Sales]), -2, 0)
    X-axis: Month
    Y-axis: Sales values
    Shows how monthly sales and rolling totals change over time.
  • Table: Sales with Rolling 3-Month Total
    Columns: Month, Sales, Rolling 3-Month Total
    Rolling 3-Month Total formula same as above.
    Example row for 2024-04: Sales=180, Rolling Total=150+200+180=530
Dashboard Layout
+----------------------+-------------------------+
|      KPI Card        |      Line Chart          |
|  Rolling 3-Month     |  Monthly Sales & Rolling |
|  Sales Total (610)   |  3-Month Total Trend     |
+----------------------+-------------------------+
|                  Table: Sales with Rolling 3-Month Total            |
+---------------------------------------------------------------------+
Interactivity

A month filter allows selecting a range of months. When changed:

  • KPI Card updates to show rolling total for the latest selected month.
  • Line Chart updates to show data only for selected months.
  • Table updates to show rows only for selected months.

This helps focus on specific time periods.

Self Check

If you add a filter to show only months from 2024-03 to 2024-05, which components update and what is the KPI Card value?

  • All components update to show data only for these months.
  • KPI Card rolling total for 2024-05 is 180 + 220 + 210 = 610.
Key Result
Dashboard showing monthly sales and rolling 3-month sales totals to track recent sales trends.