logo
search
Pivot Table Issues

How to Fix Excel Data Model Relationships Not Working in PivotTables

Anum MushtaqAnum Mushtaq Oct 23, 2026 868 views

Question details

The user is experiencing incorrect or repeated values in a PivotTable when trying to relate two fact-like tables directly in the Excel Data Model.

How to Fix Excel Data Model Relationships Not Working in a PivotTable
Product
Microsoft Excel
Device & OS
not provided
Scenario
Building a comprehensive PivotTable from multiple data sources or fact tables utilizing the Excel Data Model.
Observed behavior
The PivotTable displays repeated, duplicate, or incorrect values because the direct relationship between two fact tables lacks a proper filtering path.
Before you start

Ensure that your source data ranges are formatted as Excel Tables and identify the common column (such as an ItemCode or ID) that links your different datasets.

Solution 1Recommended

Create a Shared Dimension Table (Star Schema)

Instead of linking two fact tables directly, use a third 'dimension' table containing unique values to act as a bridge, establishing the correct filtering path.

Relating two fact-like tables (tables with repeating keys) directly in the Data Model often leads to a many-to-many relationship issue, causing PivotTables to display duplicate or inaccurate totals. To solve this, you need a Star Schema design where a central dimension table filters the fact tables.

1
Extract unique values

Copy the common linking column (e.g., ItemCode) from both of your existing tables and paste them into a single column on a new worksheet. Go to the Data tab and click 'Remove Duplicates' to create a list of strictly unique values.

2
Format as an Excel Table

Select your new list of unique values, press Ctrl+T to format it as a Table, and give the table a descriptive name like 'Dim_Item'.

3
Add to the Data Model

Click anywhere inside your new dimension table, navigate to the Power Pivot tab, and select 'Add to Data Model'.

4
Create many-to-one relationships

In the Power Pivot window, go to Diagram View. Drag the linking column from your first fact table to the unique linking column in your new dimension table. Repeat this process for the second fact table.

5
Build the PivotTable properly

Insert a new PivotTable from the Data Model. When adding fields to the Rows or Columns areas, you must drag the linking field (e.g., ItemCode) from the new Dimension table, not from either of the fact tables.

Create a Shared Dimension Table (Star Schema)
Data Filtering Restored: By utilizing the dimension table's fields for your PivotTable rows or columns, filters will properly flow down to both fact tables, yielding accurate calculations.
Free Microsoft Office alternative

Handle Complex Data Analysis Easily with WPS Office

If troubleshooting advanced Data Model relationships in Microsoft Excel is slowing you down, WPS Office provides a highly intuitive and lightweight alternative. Enjoy seamless compatibility with Excel files and powerful built-in PivotTable and data consolidation features without the steep learning curve.

  1. 1. Download and Install: Visit the official WPS Office website to download the free installer. Run the setup file to install the suite on your computer.
  2. 2. Open Your Data File: Launch WPS Spreadsheet and open your existing .xlsx workbook. All your tables and raw data will display perfectly.
  3. 3. Analyze with PivotTables: Select your data range, go to the Insert tab, and click PivotTable to quickly summarize and analyze your records.
Free and lightweight office suite with rapid loading timesFully compatible with Microsoft Excel formats (.xlsx, .xls, .csv)Intuitive PivotTable creation and data consolidation toolsSeamless migration with a highly familiar user interface
QA img-9

Frequently Asked Questions

Why do I get duplicate values when joining two tables in an Excel PivotTable?

This usually happens when you create a direct relationship between two 'fact' tables (tables containing transactional or repeated data). Without a dimension table containing unique bridging values, the Data Model cannot determine the correct filtering path, leading to Cartesian products or duplicate totals.

What is a dimension table in the Excel Data Model?

A dimension table is a lookup table that contains a single row for each unique item, such as a unique list of Product IDs or Customer Names. It is used to connect multiple fact tables in a 'star schema' design so that data can be filtered correctly across a multi-table PivotTable.

Can I relate tables in Excel without using the Data Model?

Yes. You can use functions like VLOOKUP, XLOOKUP, or INDEX/MATCH to pull data from one table into another, effectively flattening your data into a single table. Alternatively, you can use Power Query to merge the tables before generating a standard PivotTable.