0
0
Tableaubi_tool~15 mins

Query performance tuning in Tableau - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a data analyst at a retail company.
📋 Request: Your manager wants you to improve the speed of a Tableau dashboard that shows monthly sales by product category and region.
📊 Data: You have a sales dataset with columns: Order Date, Product Category, Region, Sales Amount, and Quantity. The dataset contains 10,000 rows of sales transactions over two years.
🎯 Deliverable: You need to optimize the Tableau dashboard so it loads faster while showing accurate monthly sales trends by product category and region.
Progress0 / 7 steps
Sample Data
Order DateProduct CategoryRegionSales AmountQuantity
2023-01-15ElectronicsNorth12003
2023-01-20FurnitureSouth8502
2023-02-05ElectronicsEast6001
2023-02-18Office SuppliesWest3005
2023-03-10FurnitureNorth9501
2023-03-15ElectronicsSouth13004
2023-04-01Office SuppliesEast4006
2023-04-20FurnitureWest7002
2023-05-05ElectronicsNorth11003
2023-05-18Office SuppliesSouth3504
1
Step 1: Create a calculated field in Tableau to extract the month and year from the Order Date for grouping.
Create calculated field named 'Order Month' with formula: DATETRUNC('month', [Order Date])
Expected Result
A new field 'Order Month' showing the first day of each month for each order date.
2
Step 2: Use 'Order Month' as the Columns field, 'Product Category' and 'Region' as Rows, and SUM of Sales Amount as the Values in the Tableau worksheet.
Columns: [Order Month]; Rows: [Product Category], [Region]; Values: SUM([Sales Amount])
Expected Result
A table showing total sales by product category and region for each month.
3
Step 3: Apply a data source filter to limit the data to the last 12 months to reduce data volume.
Add data source filter: [Order Date] >= DATEADD('month', -12, TODAY())
Expected Result
Dashboard only uses data from the last 12 months, improving query speed.
4
Step 4: Use Tableau's Performance Recording feature to identify slow queries and dashboard actions.
Enable Performance Recording from Help > Settings and Performance > Start Performance Recording, then interact with the dashboard and stop recording.
Expected Result
A performance workbook showing which queries or actions take the most time.
5
Step 5: Optimize calculations by replacing row-level calculations with aggregated calculations where possible.
For example, replace calculated fields using IF statements on each row with aggregated calculations using FIXED LOD expressions if needed.
Expected Result
Reduced calculation time and faster dashboard response.
6
Step 6: Use Extracts instead of live connections if the data does not need real-time updates.
Create a Tableau Data Extract (TDE or Hyper) from the data source and use it in the workbook.
Expected Result
Faster data loading and query execution.
7
Step 7: Limit the number of marks in the view by filtering or aggregating data to improve rendering speed.
Add filters to reduce categories or regions shown, or aggregate data at a higher level.
Expected Result
Dashboard renders faster with fewer visual elements.
Final Result
Monthly Sales Dashboard

+----------------+----------------+----------------+----------------+
| Product Category | Region         | Jan 2023       | Feb 2023       |
+----------------+----------------+----------------+----------------+
| Electronics    | North          | $1200          |                |
| Electronics    | East           |                | $600           |
| Furniture     | South          | $850           |                |
| Office Supplies| West           |                | $300           |
+----------------+----------------+----------------+----------------+

[Dashboard loads quickly showing monthly sales by category and region]
Sales are highest in Electronics and Furniture categories.
North and South regions show strong sales performance.
Filtering to last 12 months and using extracts improved dashboard speed significantly.
Bonus Challenge

Create a parameter to allow users to select the number of months to display dynamically and update the dashboard accordingly.

Show Hint
Use a parameter for month count and a calculated field to filter Order Date based on the parameter value.