{"id":952,"date":"2012-08-23T02:00:00","date_gmt":"2012-08-22T18:00:00","guid":{"rendered":"http:\/\/vm-officeblogs.cloudapp.net\/2012\/08\/23\/introduction-to-the-data-model-and-relationships-in-excel-2013\/"},"modified":"2024-08-29T11:18:15","modified_gmt":"2024-08-29T18:18:15","slug":"introduction-to-the-data-model-and-relationships-in-excel-2013","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/microsoft-365\/blog\/2012\/08\/23\/introduction-to-the-data-model-and-relationships-in-excel-2013\/","title":{"rendered":"Introduction to the Data Model and Relationships in Excel 2013"},"content":{"rendered":"
This blog post is brought to you by Diego Oppenheimer a Program Manager on the Excel team.<\/em><\/p>\n I am very happy to be writing this blog post today. Not just because I will be showing you another way Excel can make your data analysis easier but also because I will be introducing the new Data Model and Relationships features that will hopefully change the way you use Excel for data analysis forever.<\/p>\n For those of you who are not familiar with the power and usefulness of Pivot Tables you might want to check out this article (<\/a>Overview of PivotTable and PivotChart reports<\/a>) or this training (PivotTable I: Get started with PivotTable reports<\/a>) . Some of these articles are a bit old but the principles and functionality still apply<\/a> .<\/p>\n Ok, here we go\u2026<\/p>\n Around this time last year my wife and I were considering purchasing a house in the Seattle area, even if it meant dealing with some of the worst<\/a> traffic in the US. So like any self-respecting Excel nerd I started a spreadsheet with a table of data that fit our parameters. This data was easy to find on the many real-estate sites out there like Zillow.com or Redfin.com. One thing I noticed though was that none of the these sites by themselves had all the relevant data I wanted to make an informed decision and this is where the Data Model came into play by allowing me to combine data from multiple sources and perform a richer analysis.<\/p>\n <\/a><\/p>\n If you open the file above you will see I have a table with a lot of data. The first thing I am going to do is create a PivotTable so that I can sift through it easily. Under the INSERT tab, hit PivotTable and the I have highlighted a new option in the create PivotTable dialog which is to \u201cAdd this data to the Data Model\u201d. So what is this Data Model I speak of?<\/p>\n \u201cA Data Model is a new approach for integrating data from multiple tables, effectively building a relational data source inside the Excel workbook. Within Excel, Data Models are used transparently, providing data used in PivotTables, PivotCharts, and Power View reports<\/em>\u201c. Read more here\u2026<\/a><\/p>\n In other words, the new Data Model allows for building a \u201cmodel\u201d where data from a lot of different sources can be combined by creating \u201crelationships\u201d between the data sources. For those of you with some database knowledge this is similar to creating joins between tables, except all the tables live in Excel.<\/p>\n I chose to add this data to my Data Model because I am going to be combining it with data I will get from other sources to make my analysis more complete.<\/p>\n The first thing I want to do is look at the number of houses I have selected by zip code. To do this I drag the ZIP<\/b> field to ROWS<\/b> and the LISTING ID<\/b> field to VALUES<\/b>. By default, this will give me a SUM of LISTING ID\u2019s, <\/b>but we want a COUNT<\/b>. To do this, right click on the header that says SUM of LISTING ID<\/b> -> Value Field Settings<\/b>\u2026 and change to COUNT<\/b>. As you can see, I only have to sift through 165 house listings now (L).<\/p>\n I have decided to add a couple more fields to my PivotTable to help with my analysis. I added LIST PRICE<\/b>, DAYS ON MARKET<\/b> and SQFT<\/b> and changed the Value Field Settings to AVERAGE<\/b>.<\/p>\n At this time my PivotTable looked something like this:<\/p>\nFinding a home<\/h2>\n
My first look at the Data Model<\/h4>\n
\nfollowing dialog should pop-up:<\/a><\/p>\nCreate the PivotTable<\/a><\/h2>\n