top of page

You are learning PivotTables in MS Excel

How to create PivotTables with multiple data sources?

Excel doesn't directly create PivotTables from multiple separate data sources like different workbooks or databases. However, you can achieve similar functionality using the Data Model feature. Here's how:

1. Prepare Your Data:

- Ensure your data sources are in a tabular format with clear headers.
- Ideally, establish relationships between your data sets if they share common fields (e.g., customer ID). This will allow for seamless integration within the Data Model.

2. Create a Data Model:

- Go to the Insert tab.
- In the Power BI group, click on Power Pivot (This might be disabled by default. You may need to enable it in File > Options > Add-Ins).
- In the Power Pivot window, click Manage Relationships to define connections between related tables if applicable (skip this step if your data is independent).

3. Import Your Data:

- Click Home in the Power Pivot window.
- Select From Other Sources and choose how you want to import your data:
- From Table/Range: Select the data range in your current Excel sheet.
- From Database: Connect to an external database containing your data.
- From File: Import data from another Excel workbook or a text file.
- Repeat this process for all your data sources.

4. Create a PivotTable:

- Switch back to your Excel worksheet.
- Click on any cell where you want your PivotTable to be placed.
- Go to the Insert tab.
- Click the down arrow on PivotTable and select From Data Model.
- In the Create PivotTable dialog box, ensure Use an external data source is selected, and click OK.

5. Build Your PivotTable:

- The PivotTable Fields pane will appear, listing all the fields available from your connected data sources in the Data Model.
- Drag and drop the desired fields into the Rows, Columns, Values, and Filters sections to customize your PivotTable and analyze your combined data set.

By following these steps, you can leverage the Data Model to create PivotTables that integrate data from multiple sources within your workbook or from external connections. This allows you to gain insights from a more comprehensive perspective.

bottom of page