0
0
Tableaubi_tool~15 mins

Custom date formats in Tableau - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants a sales report that shows the order dates in a clear, customized format to improve readability and presentation.
📊 Data: You have sales data including Order ID, Order Date, Product, and Sales Amount.
🎯 Deliverable: Create a Tableau report that displays sales data with Order Dates formatted as 'MMM dd, yyyy' (e.g., Jan 05, 2024) and also as 'dddd, MMMM dd' (e.g., Friday, January 05) in separate views.
Progress0 / 6 steps
Sample Data
Order IDOrder DateProductSales Amount
10012024-01-05Desk Chair150
10022024-01-06Office Desk300
10032024-01-07Monitor200
10042024-01-08Keyboard50
10052024-01-09Mouse25
10062024-01-10Desk Lamp45
10072024-01-11Notebook15
10082024-01-12Pen Set10
1
Step 1: Connect your sales data to Tableau and open a new worksheet.
Import the data source with columns: Order ID, Order Date, Product, Sales Amount.
Expected Result
Data is loaded and visible in Tableau's Data pane.
2
Step 2: Create a calculated field to format Order Date as 'MMM dd, yyyy'.
Name: Formatted Date 1 Formula: LEFT(DATENAME('month', [Order Date]), 3) + ' ' + RIGHT('0' + STR(DAY([Order Date])), 2) + ', ' + STR(YEAR([Order Date]))
Expected Result
A new field 'Formatted Date 1' shows dates like 'Jan 05, 2024'.
3
Step 3: Create another calculated field to format Order Date as 'dddd, MMMM dd'.
Name: Formatted Date 2 Formula: DATENAME('weekday', [Order Date]) + ', ' + DATENAME('month', [Order Date]) + ' ' + RIGHT('0' + STR(DAY([Order Date])), 2)
Expected Result
A new field 'Formatted Date 2' shows dates like 'Friday, January 05'.
4
Step 4: Build the first view: drag 'Formatted Date 1' to Rows, 'Sales Amount' to Columns, and 'Product' to Detail.
Configure the view as a bar chart showing sales by formatted date.
Expected Result
Bar chart displays sales amounts with dates formatted as 'Jan 05, 2024'.
5
Step 5: Build the second view: drag 'Formatted Date 2' to Rows, 'Sales Amount' to Columns, and 'Product' to Detail.
Configure the view as a bar chart showing sales by the second date format.
Expected Result
Bar chart displays sales amounts with dates formatted as 'Friday, January 05'.
6
Step 6: Create a dashboard and add both views side by side for comparison.
Use Tableau's dashboard feature to place both charts next to each other.
Expected Result
Dashboard shows two charts with different custom date formats for easy comparison.
Final Result
-------------------------------------------------
| Sales Report Dashboard                         |
|------------------------------------------------|
| Formatted Date 1 View       | Formatted Date 2 View |
| Jan 05, 2024  | ████████   | Friday, January 05 | ████████ |
| Jan 06, 2024  | ██████████ | Saturday, January 06| ██████████|
| Jan 07, 2024  | ███████    | Sunday, January 07  | ███████  |
| ...           | ...        | ...                | ...      |
-------------------------------------------------
Custom date formats improve report readability and presentation.
Using different date formats helps different audiences understand the timeline better.
Sales trends are clearly visible with formatted dates enhancing clarity.
Bonus Challenge

Create a parameter to let users switch between different date formats dynamically in the dashboard.

Show Hint
Use a string parameter with options for each date format and a calculated field that uses IF or CASE to apply the selected format.