0
0
Tableaubi_tool~8 mins

LOD with date dimensions in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - LOD with date dimensions
Business Question

How can we analyze total sales per year and compare it with sales per month using Level of Detail (LOD) expressions with date dimensions?

Sample Data
Order IDOrder DateSales
10012023-01-15150
10022023-02-20200
10032023-02-25100
10042023-03-10250
10052024-01-05300
10062024-02-15350
10072024-03-20400
Dashboard Components
  • KPI Card: Total Sales per Year
    Formula: { FIXED YEAR([Order Date]) : SUM([Sales]) }
    Explanation: Calculates total sales for each year regardless of other filters.
    Example values:
    • 2023: 700
    • 2024: 1050
  • Bar Chart: Sales per Month
    Dimension: MONTH([Order Date])
    Measure: SUM([Sales])
    Explanation: Shows monthly sales totals, filtered by year if selected.
    Example values for 2023:
    • Jan: 150
    • Feb: 300
    • Mar: 250
  • Table: Detailed Orders
    Columns: Order ID, Order Date, Sales
    Shows individual sales records.
Dashboard Layout
+----------------------+-----------------------+
| Total Sales per Year  | Sales per Month Chart  |
|      (KPI Card)      |                       |
+----------------------+-----------------------+
|          Detailed Orders Table               |
+---------------------------------------------+
Interactivity

A year filter allows users to select a specific year. When a year is selected:

  • The Sales per Month bar chart updates to show monthly sales only for that year.
  • The Detailed Orders table filters to show orders only from the selected year.
  • The Total Sales per Year KPI card remains unchanged because the LOD expression fixes sales by year ignoring the filter, showing total sales for all years.
Self Check

If you add a filter to select the year 2023, which components update and how?

  • Sales per Month Chart: Updates to show only months in 2023 with sales totals.
  • Detailed Orders Table: Shows only orders from 2023.
  • Total Sales per Year KPI: Does not change; still shows total sales per year for all years because of the fixed LOD calculation.
Key Result
Dashboard shows total sales per year using LOD, monthly sales trends, and detailed order data with year filtering.