Use multiple tables to create a PivotTable
You can absolutely use multiple tables to create a PivotTable in Excel — and it’s especially powerful when your data is related but stored in separate tables. This is done using the Data Model in Excel, which lets you create relationships between tables (similar to how databases work).
✅ How to Create a PivotTable from Multiple Tables
🧱 Step 1: Format Your Data as Tables
- Select each dataset and press Ctrl + T to format it as a Table.
- Give each table a meaningful name:
- Go to the Table Design tab → rename in the Table Name box (e.g.,
Sales,Products,Employees).
- Go to the Table Design tab → rename in the Table Name box (e.g.,
🔄 Step 2: Create a Relationship Using the Data Model
- Go to the Insert tab → click PivotTable.
- In the dialog:
- Choose “Use this workbook’s Data Model”.
- Check “Add this data to the Data Model” (if prompted).
- Select “From External Data Source” → then choose the tables.
🔗 Step 3: Define Relationships Between Tables
- Go to the Data tab → click Relationships.
- Click New and define relationships using key fields (e.g.,
ProductIDin bothSalesandProductstables).Example:
- Table:
Sales - Column:
ProductID - Related Table:
Products - Related Column:
ProductID
- Table:
- Repeat for any other related tables.
📊 Step 4: Build the PivotTable
- Now go back to your PivotTable.
- In the PivotTable Fields pane, you’ll see all tables listed.
- Drag fields from different tables — Excel will use the Data Model to connect them automatically.
🎯 Example Use Case
Suppose you have:
Salestable: OrderID, ProductID, QuantityProductstable: ProductID, ProductName, CategoryEmployeestable: EmployeeID, Name, Region
You can build a PivotTable that summarizes sales by product category and region, even though those fields live in different tables!