0
0
Tableaubi_tool~8 mins

Cross-database joins in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Cross-database joins
Business Question

How can we combine sales data from our SQL database with customer info from an Excel file to analyze total sales by customer region?

Sample Data

SQL Sales Data

OrderIDCustomerIDSalesAmount
1001C001250
1002C002450
1003C003300
1004C001150
1005C004500

Excel Customer Data

CustomerIDCustomerNameRegion
C001Alpha CorpEast
C002Beta LLCWest
C003Gamma IncEast
C004Delta CoSouth
C005Epsilon LtdNorth
Dashboard Components
  • KPI Card: Total Sales - SUM([SalesAmount]) from joined data = 1650
  • Bar Chart: Sales by Region - SUM([SalesAmount]) grouped by [Region]
  • Table: Sales Details - Shows OrderID, CustomerName, Region, SalesAmount from joined data

Join Details: Inner join on CustomerID between SQL Sales Data and Excel Customer Data

Calculated Field for Sales by Region: SUM([SalesAmount])

Dashboard Layout
+----------------------+-----------------------+
|      Total Sales      |    Sales by Region    |
|       (KPI Card)      |      (Bar Chart)      |
+----------------------+-----------------------+
|                  Sales Details Table               |
+----------------------------------------------------+
  
Interactivity

A filter on Region lets users select one or more regions.

When a region is selected, the Sales by Region bar chart updates to show only those regions.

The Total Sales KPI updates to sum sales only for the selected regions.

The Sales Details table filters to show only orders from customers in the selected regions.

Self Check

If you add a filter for Region = East, which components update and what data do they show?

  • Total Sales: Updates to 700 (250 + 300 + 150 from customers in East)
  • Sales by Region: Shows only the East region bar with total 700
  • Sales Details Table: Shows orders 1001, 1003, 1004 with customer names Alpha Corp and Gamma Inc
Key Result
Dashboard combining sales from SQL and customer regions from Excel to analyze total sales by region.