Building a data model in Excel lets you pull several related tables into one workbook and analyse them together without pasting data side by side or writing dozens of VLOOKUPs. In practice it means loading your tables into Power Pivot, linking them through relationships on shared fields, then building PivotTables, PivotCharts or Power BI-style measures on top. You need a Windows desktop version of Excel that includes Power Pivot (Excel 2016 and later, or Microsoft 365 on Windows); the feature is not available in Excel for Mac or in the browser version, so on those platforms you can only use plain PivotTables over a single table. Menu names can differ slightly between versions, and some options sit in different ribbons depending on your build, so if a label does not match exactly, look for the nearest equivalent.

What You'll Need

  • A Windows desktop copy of Excel with Power Pivot enabled (Microsoft 365, Excel 2019, or 2021).
  • Two or more related data tables, each with a clean header row and one column that uniquely identifies each row.
  • A column that appears in both tables to act as the link, such as a Customer ID or a Product Code.
  • Your source data stored in the same workbook, an external file, or a database you can reach from Excel.

Step-by-Step

  1. Confirm Power Pivot is available. Open the workbook and look for a Power Pivot tab on the ribbon. If you do not see it, go to File > Options > Add-ins, choose COM Add-ins from the Manage dropdown, click Go, and tick Microsoft Power Pivot for Excel. Restart Excel if prompted.
  2. Clean each source table first. Remove blank rows, merge cells and total rows from the bottom of each table. Every column needs a clear unique heading, and the field you plan to join on must contain the same values in both tables — the same IDs, the same spelling, the same capitalisation. Fixing this before loading saves a lot of rework later.
  3. Format each range as a table. Select your data and press Ctrl+T (or go to Insert > Table). Give the table a meaningful name in the Table Design tab so the model is readable, for example tblCustomers and tblOrders.
  4. Add the tables to the data model. With a table cell selected, open the Power Pivot tab and choose Add to Data Model. Repeat for every table. Each one appears in the Power Pivot window as its own tab. An alternative is Data > Get Data, which gives more control over cleaning and lets you load straight into the model; use it if your source is a file or database rather than a sheet.
  5. Check data types in the Power Pivot window. Each column has an icon for its type. Dates stored as text or numbers stored as text will break relationships and calculations, so select the column and correct the type before going further.
  6. Open the diagram view. In the Power Pivot window, choose Home > Diagram View. Your tables appear as boxes. Drag the connecting field from one table onto the matching field in the other. Excel usually detects a one-to-many link automatically; confirm it is correct.
  7. Watch for many-to-many and duplicate keys. A relationship needs one side where the key is unique — typically the dimension table such as customers — and one side where it can repeat, such as orders. If both sides contain duplicates, create a lookup table of distinct IDs and link both tables to it.
  8. Name the relationship and check direction. Double-click the line to review it. The filter should flow from the unique-key table to the repeating-rows table, so selecting a customer filters their orders and not the other way round.
  9. Add a Date table if you use dates. Reporting on months or years is far more reliable with a dedicated calendar table holding one row per day plus Year, Quarter and Month columns, connected to your fact table's date field. Do not link two fact tables directly to each other.
  10. Build a PivotTable from the model. Go back to the spreadsheet, choose Insert > PivotTable, and select Use This Workbook's Data Model in the dialog. The field list now shows every table in the model, so you can drop a customer name from one table next to a sales total from another.
  11. Create measures for anything you want to reuse. In the PivotTable Fields pane, right-click the table and choose Add Measure. Write a formula such as total sales, or a ratio of profit to revenue, so every view uses the same calculation rather than hand-built fields that drift apart.
  12. Refresh when the source changes. Use Data > Refresh All, or the Refresh button in the Power Pivot window, to pull updated rows through. If a table was added via a sheet range, the range still needs to cover the new rows.

Common Mistakes

  • Linking on names instead of IDs. A customer name can be spelled two ways; a customer ID cannot, so join on the identifier.
  • Leading or trailing spaces in key columns. The values look identical but will not match. Trim them in the source or in Power Query before loading.
  • Mixing data types, such as an order number stored as text in one table and as a number in the other. Excel treats those as different values.
  • Building several unrelated PivotTables from separate ranges and assuming they are connected. Only fields in the model are linked.
  • Adding calculated columns in the source sheet rather than the model, so totals double-count when a table is refreshed.
  • Forgetting that relationships need one unique side. Seeing a warning about a relationship that cannot be created almost always means duplicate keys.

Tips

  • Keep a tidy star shape: one facts table full of transactions and several small reference tables around it. It is easier to maintain than a chain of linked tables.
  • Give tables, columns and measures human-readable names; the model's field list is what colleagues will see.
  • Hide technical key columns from the PivotTable field list so people pick the friendly name instead of a numeric ID.
  • Use Power Query to import and shape data before it reaches the model; the cleaning steps are saved and repeat on refresh.
  • Test with a small slice of data first. Verify one customer's totals against a manual calculation before trusting the whole dashboard.

Troubleshooting

If a table will not join, open the Power Pivot window and sort or filter the key column on both tables. Look for blanks, spaces and values that exist on one side only. Fixing the data is usually faster than forcing a link.

If a PivotTable shows the same total on every row, a relationship is probably missing or pointing the wrong way. Recheck it in Diagram View and make sure the filter flows from the unique-key table.

If totals look doubled, you likely have two paths between the same tables or a duplicated row in a lookup table. Remove the redundant relationship or deduplicate the lookup.

If the Power Pivot tab has disappeared, re-enable the COM add-in as described in step one and restart Excel.

If dates group oddly, build the separate calendar table and link to it rather than relying on automatic date grouping. If refresh fails after moving the file, the source path has changed; repair the connection in Data > Queries & Connections or Get Data.

Frequently Asked Questions

Can I use a data model in Excel for Mac?

No. Power Pivot and the in-workbook data model are Windows-only. On Mac you can still use ordinary PivotTables over one table, or open a workbook that already contains a model, but you cannot build or edit relationships.

Do I need Power Pivot to use a data model?

The model is the same engine; Power Pivot is the interface for editing relationships and measures. Some simple models can be created by ticking Add to Data Model during import, but managing them properly needs Power Pivot enabled.

How many tables can a model hold?

There is no practical limit worth worrying about for office use; the constraint is workbook performance and your computer's memory, not a fixed table count. Keep only the columns you need.

What is the difference between a relationship and a VLOOKUP?

A VLOOKUP copies values into each row and must be rerun when data changes. A relationship stores only the link, so the model stays smaller and updates automatically on refresh.

Why does my PivotTable not offer the Data Model option?

The workbook may have no tables loaded into the model, or your Excel edition lacks the feature. Add at least one table to the model first, then insert the PivotTable.

Can I edit the data inside the model?

Yes, in the Power Pivot window, but changes there are overwritten on refresh if the table is connected to a source. Edit the source instead so the change persists.