0
0
Tableaubi_tool~8 mins

Difference and percent difference in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Difference and percent difference
Business Question

How have sales changed from the previous month? Show both the difference and the percent difference.

Sample Data
MonthSales
January1000
February1200
March900
April1500
May1300
June1600
Dashboard Components
  • KPI Card: Total Sales Current Month
    Formula: SUM([Sales]) filtered by selected month
    Example: For April, shows 1500
  • KPI Card: Difference from Previous Month
    Formula: SUM([Sales]) - LOOKUP(SUM([Sales]), -1)
    Example: For April, 1500 - 900 = 600
  • KPI Card: Percent Difference from Previous Month
    Formula: (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / LOOKUP(SUM([Sales]), -1)
    Example: For April, (1500 - 900) / 900 = 0.6667 (66.67%)
  • Line Chart: Sales Over Months
    X-axis: Month
    Y-axis: Sales
    Shows trend of sales month to month
  • Table: Monthly Sales with Difference and Percent Difference
    Columns: Month, Sales, Difference, Percent Difference
    Uses same formulas as KPI cards but for all months
    First month difference and percent difference show as blank or 0
Dashboard Layout
+--------------------------------------------------+
| Total Sales Current Month | Difference | % Diff  |
|        [KPI Card]         | [KPI Card] | [KPI]   |
+--------------------------------------------------+
|                                                  |
|               Sales Over Months                   |
|                 [Line Chart]                      |
|                                                  |
+--------------------------------------------------+
|                                                  |
|    Monthly Sales Table with Difference Columns   |
|                 [Data Table]                      |
|                                                  |
+--------------------------------------------------+
Interactivity

User selects a month from a filter dropdown. The KPI cards update to show sales, difference, and percent difference for that month. The line chart highlights the selected month. The table shows all months with their sales and differences, but the selected month is emphasized.

Self Check

If you add a filter to select the month "May", which components update and what values do they show?

  • KPI Cards update to May sales (1300), difference (1300 - 1500 = -200), and percent difference (-200 / 1500 = -13.33%)
  • Line chart highlights May
  • Table remains showing all months but highlights May row
Key Result
Dashboard shows monthly sales with difference and percent difference from previous month using KPI cards, line chart, and table.