0
0
Tableaubi_tool~8 mins

Custom date formats in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Custom date formats
Dashboard Goal

Understand sales trends by showing dates in different custom formats to make the timeline easier to read and compare.

Sample Data
Order IDOrder DateSales
10012024-01-15250
10022024-02-20450
10032024-03-05300
10042024-04-10500
10052024-05-25350
10062024-06-15400
Dashboard Components
  • KPI Card: Total Sales
    Formula: SUM([Sales])
    Result: 2250
  • Line Chart: Sales Over Time (Custom Date Formats)
    Dates formatted in three ways:
    * DATENAME('month', [Order Date]) + ' ' + STR(DATEPART('year', [Order Date])) (e.g., "January 2024")
    * STR(DATEPART('month', [Order Date])) + '/' + STR(DATEPART('year', [Order Date])) (e.g., "1/2024")
    * LEFT(DATENAME('month', [Order Date]), 3) + ' ' + STR(DAY([Order Date])) + ', ' + STR(DATEPART('year', [Order Date])) (e.g., "Jan 15, 2024")
    Shows sales trend by these date formats on the X-axis and sales on Y-axis.
  • Table: Orders with Custom Date Formats
    Columns:
    * Order ID
    * Original Order Date
    * Custom Format 1: DATENAME('month', [Order Date]) + ' ' + STR(DATEPART('year', [Order Date]))
    * Custom Format 2: STR(DATEPART('month', [Order Date])) + '/' + STR(DATEPART('year', [Order Date]))
    * Custom Format 3: LEFT(DATENAME('month', [Order Date]), 3) + ' ' + STR(DAY([Order Date])) + ', ' + STR(DATEPART('year', [Order Date]))
Dashboard Layout
+----------------------+-----------------------------+
|      Total Sales      |      Sales Over Time         |
|       (KPI Card)      |      (Line Chart)            |
+----------------------+-----------------------------+
|                 Orders with Custom Date Formats          |
|                          (Table)                         |
+----------------------------------------------------------+
Interactivity

A date range filter lets users select a start and end date. When changed, all components update:

  • Total Sales: recalculates sum for selected dates.
  • Line Chart: shows sales trend only within selected date range.
  • Table: lists orders only within selected date range with custom date formats.
Self Check

If you add a filter to show only orders from March 2024 to May 2024, which components update and how?

  • Total Sales: updates to sum sales for orders 1003, 1004, and 1005 (300 + 500 + 350 = 1150).
  • Line Chart: displays sales points only for March, April, and May 2024.
  • Table: shows only orders 1003, 1004, and 1005 with their custom formatted dates.
Key Result
Dashboard showing total sales and sales trends with custom date formats and interactive date filtering.