0
0
Tableaubi_tool~15 mins

Cross-database joins 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 you to analyze total sales by product category combining sales data from the online store and inventory data from the warehouse database.
📊 Data: You have two data sources: 1) Online Sales database with columns OrderID, ProductID, Quantity, SalesAmount; 2) Warehouse Inventory database with columns ProductID, Category, StockLevel.
🎯 Deliverable: Create a Tableau dashboard showing total sales amount by product category, combining data from both databases using cross-database joins.
Progress0 / 6 steps
Sample Data
OrderIDProductIDQuantitySalesAmount
1001P001240
1002P002125
1003P003375
1004P001120
1005P0045100

ProductIDCategoryStockLevel
P001Electronics50
P002Home Goods30
P003Electronics20
P004Clothing40
P005Clothing15
1
Step 1: Connect Tableau to the Online Sales database and load the Sales table with columns OrderID, ProductID, Quantity, SalesAmount.
In Tableau, click 'Connect to Data', select the Online Sales database, and import the Sales table.
Expected Result
Sales data with 5 rows loaded into Tableau.
2
Step 2: Connect Tableau to the Warehouse Inventory database and load the Inventory table with columns ProductID, Category, StockLevel.
In Tableau, add a new data source, select the Warehouse Inventory database, and import the Inventory table.
Expected Result
Inventory data with 5 rows loaded into Tableau.
3
Step 3: Create a cross-database join between the Sales and Inventory tables on the ProductID field.
In Tableau's Data Source tab, drag the Inventory table next to the Sales table and join on Sales.ProductID = Inventory.ProductID using an inner join.
Expected Result
A combined data source with sales and category information joined by ProductID.
4
Step 4: Create a calculated field 'Total Sales' summing SalesAmount.
Create calculated field: SUM([SalesAmount])
Expected Result
Total Sales measure available for analysis.
5
Step 5: Build a bar chart visualization with Category on Rows and Total Sales on Columns.
Drag 'Category' to Rows shelf and 'Total Sales' to Columns shelf.
Expected Result
Bar chart showing total sales amount for each product category.
6
Step 6: Format the chart with clear labels and title 'Total Sales by Product Category'.
Add chart title and axis labels in Tableau formatting options.
Expected Result
Clean, readable bar chart ready for presentation.
Final Result
Total Sales by Product Category

Category      | Total Sales
--------------|------------
Electronics   | ########## (135)
Home Goods    | ### (25)
Clothing      | ####### (100)

Bar chart bars represent sales amounts visually.
Electronics category has the highest total sales of 135.
Clothing category follows with total sales of 100.
Home Goods category has the lowest sales at 25.
Cross-database join successfully combined sales and inventory data for analysis.
Bonus Challenge

Add a filter to the dashboard to allow users to select sales by specific categories dynamically.

Show Hint
Use Tableau's filter feature on the Category field and show filter control on the dashboard.