Create a Data Model in Excel (2024)

A Data Model allows you to integrate data from multiple tables, effectively building a relational data source inside an Excel workbook. Within Excel, Data Models are used transparently, providing tabular data used in PivotTables and PivotCharts. A Data Model is visualized as a collection of tables in a Field List, and most of the time, you’ll never even know it's there.

Before you can start working with the Data Model, you need to get some data. For that we'll use the Get & Transform (Power Query) experience, so

Where is Power Pivot?

  • Excel 2016 & Excel for Microsoft 365 - Power Pivot is included in the Ribbon.

  • Excel 2013 - Power Pivot is part of the Office Professional Plus edition of Excel 2013, but is not enabled by default. Learn more about starting the Power Pivot add-in for Excel 2013.

  • Excel 2010 - Download the Power Pivot add-in, then install the Power Pivot add-in.

  • Excel 2016 & Excel for Microsoft 365 - Get & Transform (Power Query) has been integrated with Excel on the Data tab.

  • Excel 2013 - Power Query is an add-in that's included with Excel, but needs to be activated. Go to File > Options > Add-Ins, then in the Manage drop-down at the bottom of the pane, select COM Add-Ins > Go. Check Microsoft Power Query for Excel, then OK to activate it. A Power Query tab will be added to the ribbon.

  • Excel 2010 - Download and install the Power Query add-in.. Once activated, a Power Query tab will be added to the ribbon.

Getting started

First, you need to get some data.

  1. In Excel 2016, and Excel for Microsoft 365, use Data > Get & Transform Data > Get Data to import data from any number of external data sources, such as a text file, Excel workbook, website, Microsoft Access, SQL Server, or another relational database that contains multiple related tables.

    In Excel 2013 and 2010, go to Power Query > Get External Data, and select your data source.

  2. Excel prompts you to select a table. If you want to get multiple tables from the same data source, check the Enable selection of multiple tables option. When you select multiple tables, Excel automatically creates a Data Model for you.

    Note:For these examples, we're using an Excel workbook with fictional student details on classes and grades. You can download our Student Data Model sample workbook, and follow along. You can also download a version with a completed Data Model..

    Create a Data Model in Excel (1)
  3. Select one or more tables, then click Load.

    If you need to edit the source data, you can choose the Edit option. For more details see: Introduction to the Query Editor (Power Query).

You now have a Data Model that contains all of the tables you imported, and they will be displayed in the PivotTable Field List.

Notes:

  • Models are created implicitly when you import two or more tables simultaneously in Excel.

  • Models are created explicitly when you use the Power Pivot add-in to import data. In the add-in, the model is represented in a tabbed layout similar to Excel, where each tab contains tabular data. See Get data using the Power Pivot add-into learn the basics of data import using a SQL Server database.

  • A model can contain a single table. To create a model based on just one table, select the table and click Add to Data Model in Power Pivot. You might do this if you want to use Power Pivot features, such as filtered datasets, calculated columns, calculated fields, KPIs, and hierarchies.

  • Table relationships can be created automatically if you import related tables that have primary and foreign key relationships. Excel can usually use the imported relationship information as the basis for table relationships in the Data Model.

  • For tips on how to reduce the size of a data model, see Create a memory-efficient Data Model using Excel and Power Pivot.

  • For further exploration, see Tutorial: Import Data into Excel, and Create a Data Model.

Tip:How can you tell if your workbook has a Data Model? Go to Power Pivot > Manage. If you see worksheet-like data, then a model exists. See: Find out which data sources are used in a workbook data model to learn more.

Create Relationships between your tables

The next step is to create relationships between your tables, so you can pull data from any of them. Each table needs to have a primary key, or unique field identifier, like Student ID, or Class number. The easiest way is to drag and drop those fields to connect them in Power Pivot's Diagram View.

  1. Go to Power Pivot > Manage.

  2. On the Home tab, select Diagram View.

    See Also
    Home

  3. All of your imported tables will be displayed, and you might want to take some time to resize them depending on how many fields each one has.

  4. Next, drag the primary key field from one table to the next. The following example is the Diagram View of our student tables:

    Create a Data Model in Excel (2)

    We've created the following links:

    • tbl_Students | Student ID > tbl_Grades | Student ID

      In other words, drag the Student ID field from the Students table to the Student ID field in the Grades table.

    • tbl_Semesters | Semester ID > tbl_Grades | Semester

    • tbl_Classes | Class Number > tbl_Grades | Class Number

    Notes:

    • Field names don't need to be the same in order to create a relationship, but they do need to be the same data type.

    • The connectors in the Diagram View have a "1" on one side, and an "*" on the other. This means that there is a one-to-many relationship between the tables, and that determines how the data is used in your PivotTables. See: Relationships between tables in a Data Model to learn more.

    • The connectors only indicate that there is a relationship between tables. They won't actually show you which fields are linked to each other. To see the links, go to Power Pivot > Manage > Design > Relationships > Manage Relationships. In Excel, you can go to Data > Relationships.

Use a Data Model to create a PivotTable or PivotChart

An Excel workbook can contain only one Data Model, but that model can contain multiple tables which can be used repeatedly throughout the workbook. You can add more tables to an existing Data Model at any time.

  1. In Power Pivot, go to Manage.

  2. On the Home tab, select PivotTable.

  3. Select where you want the PivotTable to be placed: a new worksheet, or the current location.

  4. Click OK, and Excel will add an empty PivotTable with the Field List pane displayed on the right.

    Create a Data Model in Excel (3)

Next, create a PivotTable, or create a Pivot Chart. If you've already created relationships between the tables, you can use any of their fields in the PivotTable. We've already created relationships in the Student Data Model sample workbook.

Add existing, unrelated data to a Data Model

Suppose you’ve imported or copied lots of data that you want to use in a model, but haven't added it to the Data Model. Pushing new data into a model is easier than you think.

  1. Start by selecting any cell within the data that you want to add to the model. It can be any range of data, but data formatted as an Excel table is best.

  2. Use one of these approaches to add your data:

  3. Click Power Pivot > Add to Data Model.

  4. Click Insert > PivotTable, and then check Add this data to the Data Model in the Create PivotTable dialog box.

The range or table is now added to the model as a linked table. To learn more about working with linked tables in a model, see Add Data by Using Excel Linked Tables in Power Pivot.

Adding data to a Power Pivot table

In Power Pivot, you cannot add a row to a table by directly typing in a new row like you canin an Excel worksheet. But you can add rows by copying and pasting, or updating the source data and refreshing the Power Pivot model.

Need more help?

You can always ask an expert in the Excel Tech Communityor get support inCommunities.

See Also

Introduction to the Query Editor (Power Query)

Create a memory-efficient Data Model using Excel and Power Pivot

Tutorial: Import Data into Excel, and Create a Data Model

Find out which data sources are used in a workbook data model

Relationships between tables in a Data Model

Create a Data Model in Excel (2024)

FAQs

Can Excel be used for Modelling? ›

MS Excel is an unparalleled tool for financial modelling; it helps make projections, analyse and predict financial data, and make outcome evaluations of financial decisions. Apart from being an excellent financial modelling tool, MS Excel is also a handy analysis and financial planning tool.

How do I create a Data Model? ›

5 Steps to Building an Effective Data Model
  1. Define the Purpose of Your Data Model. ...
  2. Identify the Data Entities and Their Attributes. ...
  3. Determine the Relationships Between the Data Entities. ...
  4. Choose the Right Data Modeling Methodology. ...
  5. Test and Refine Your Data Model. ...
  6. Wrapping up.

Can I create a Data Model in Excel? ›

Excel prompts you to select a table. If you want to get multiple tables from the same data source, check the Enable selection of multiple tables option. When you select multiple tables, Excel automatically creates a Data Model for you.

What is the difference between a spreadsheet and a model? ›

A model will contain variable inputs which, when changed, will impact the results of the model. A spreadsheet might simply be a report which aggregates information from other sources and assembles it in a useful presentation.

Can you create 3D models in Excel? ›

Whether you're creating a presentation in PowerPoint or building a catalog in Excel, 3D makes your work stand out. It's built-in to the Office apps you love, and with Paint 3D in Windows 10, you can easily edit or even create 3D models.

Is Excel a data modelling tool? ›

In both Excel and in Power Pivot, you can create a Data Model, a collection of tables with relationships. The data model you see in a workbook in Excel is the same data model you see in the Power Pivot window.

What is considered an Excel model? ›

So, we've defined what an Excel model is: An Excel model is a spreadsheet that makes quantitative estimates or predictions based on a set of underlying assumptions.

What is Microsoft Excel modeling? ›

An Excel model contains several elements that help you display your data and make predictions. Here are some items you may include in your Excel model: Input variables: Input variables are numerals that users enter into a formula and can impact the output or response of a data system.

What is a data model example? ›

Example of a network data model:

Consider a social network where users can have multiple friends and be part of multiple groups. The data model would have multiple levels of related records (users, friends, and groups) with many-to-many relationships.

How do you create a model from a dataset? ›

I'll cover the following topics:
  1. Loading the dataset.
  2. Understanding the dataset.
  3. Data preprocessing.
  4. Data visualization.
  5. Building a regression model.
  6. Model evaluation.
  7. Model prediction.
Jan 28, 2022

What is a data model for dummies? ›

Data modeling is a process used to define and organize data requirements for a system. It involves creating a conceptual representation of how data should be structured and related within a database, with the goal of supporting the business processes or requirements of an organization.

How to create a model in an Excel sheet? ›

The Data Model in Excel: What It Is And Why It's Useful
  • Click the Data tab -> Click a cell within the table you want to import
  • Select Close & Load -> then Close & Load to...
  • Select Only Create Connection
  • Go to the tab Data -> Select Manage Data Model
  • Click Diagram view.
  • Go to the tab Insert -> Click Pivot Table

How do you create a data matrix in Excel? ›

How to create a matrix in Excel
  1. Display the "SmartArt" window. To display the "SmartArt" window, click on the "Insert" tab on the command ribbon. ...
  2. Choose your matrix. ...
  3. Enter your data into the matrix. ...
  4. Design your matrix. ...
  5. Include additional details. ...
  6. Save your worksheet.
Feb 12, 2024

How do you create a normal model in Excel? ›

To make a normal distribution graph, go to the “Insert” tab, and in “Charts,” select a “Scatter” chart with smoothed lines and markers. When we insert the chart, we see that our bell curve or normal distribution graph is created.

How do I make an Excel model look professional? ›

How to format an Excel spreadsheet to look professional.
  1. Align text left or right. It's tempting to center the text in some cells, particularly those that serve as headers. ...
  2. Leave the first row and column empty. ...
  3. Remove cell borders. ...
  4. Limit colors in your Excel spreadsheet. ...
  5. Share your Excel spreadsheets as PDF files.

How to create a growth model in Excel? ›

How to use the growth formula in Excel
  1. Start by highlighting B7:B8.
  2. Type =Growth(
  3. Highlight B1:B6 (the known y values) then press ,
  4. Highlight A1:A6 (the known x values) then press ,
  5. Highlight A7:A8 (new x values)
  6. Press Ctrl + Shift + Enter.

What is the first step in spreadsheet modeling? ›

THE SPREADSHEET MODELING PROCESS
  1. Ironically, the first step is to turn off the computer and instead draw a picture to better understand the situation. Identify the uncontrollable inputs, the decision variables, and the outputs. ...
  2. On paper, sketch out an overall plan for the model. ...
  3. Develop the base case spreadsheet model.

Top Articles
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 6111

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.