{"id":936,"date":"2012-12-13T18:12:00","date_gmt":"2012-12-13T10:12:00","guid":{"rendered":"http:\/\/vm-officeblogs.cloudapp.net\/2012\/12\/13\/introduction-to-powerpivot-in-excel-2013\/"},"modified":"2024-08-29T11:17:38","modified_gmt":"2024-08-29T18:17:38","slug":"introduction-to-powerpivot-in-excel-2013","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/microsoft-365\/blog\/2012\/12\/13\/introduction-to-powerpivot-in-excel-2013\/","title":{"rendered":"Introduction to PowerPivot in Excel 2013"},"content":{"rendered":"
This blog post was brought to you by Diego Oppenheimer a Program Manager on the Excel team. <\/i><\/p>\n
<\/a><\/b><\/p>\n Some weeks ago I introduced an important, new part of the Excel 2013 Data Model and how you could create relationships between different data sources right in your Excel workbook (http:\/\/www.microsoft.com\/b\/microsoft-excel\/archive\/2012\/08\/23\/introduction-to-the-data-model-and-relationships.aspx<\/a>). In today\u2019s post I am going to show you how you can expand on this Data Model and add all sorts of analysis \u201cgoodies\u201d using the PowerPivot add-in that\u2019s built into Excel 2013.<\/p>\n NOTE: If you are on the consumer preview of Office 2013 then the add-in is available. Once you upgrade to the full version you will need Office 2013 Pro Plus for this functionality to be available.<\/i><\/p>\n Activating the add-in<\/b><\/p>\n The simplest way to activate the PowerPivot add-in is to just insert a PowerView sheet from the ribbon:<\/p>\n <\/a><\/p>\n This will automatically create an empty Data Model, insert a blank PowerView canvas (http:\/\/www.microsoft.com\/b\/microsoft-excel\/archive\/2012\/10\/04\/intro-to-power-view-for-excel-2013.aspx<\/a>) and activate the PowerPivot ribbon.<\/p>\n If this all worked all right, your ribbon should have a Powerpivot tab at the end:<\/p>\n <\/a><\/p>\n Another route is to go to File-> Options -> Add-Ins and then on the bottom dropdown select COM Add-ins:<\/p>\n <\/a><\/p>\n Once inside you can enable Microsoft Office PowerPivot for Excel 2013.<\/p>\n PowerPivot vs. Data Model: I am confused<\/b><\/p>\n Let\u2019s take a step back to explain a little bit further the differences in functionality (especially for those of you who have used PowerPivot in the past).<\/p>\n In previous versions of the PowerPivot add-in (Office 2010), the add-in was a standalone application that was user downloaded and installed. The add-in came with two components: an in-memory data analysis engine and a modelling user interface.<\/p>\n In Excel 2013, the engine component has been directly integrated, and we refer to it as the Data Model engine (the technology is actually called xVelocity). All the basic components of the Data Model like import data and create relationships are available for ever every version of Excel, but the extra modelling component is reserved for those with Office 2013 Pro Plus.<\/p>\n The extra modelling component has a ton of features that anybody who is serious about data analysis will want to have (don\u2019t take my word for it try it yourself!), including:<\/p>\n \u00b7 Pre-filtering data when importing<\/b><\/p>\n \u00b7 DAX expression language for intuitive calculations<\/b><\/p>\n \u00b7 Rename tables and columns as you import data in PowerPivot<\/b><\/p>\n \u00b7 Use the Diagram View to manage your model and create relationships<\/b><\/p>\n \u00b7 Define calculated fields and key performance indicators<\/b><\/p>\n \u00b7 more<\/a><\/b><\/p>\n Adding some more data analysis to my housing search<\/b><\/p>\n As my starting point, I am going to use the file I used for my last blog post. I open the PowerPivot window by simply clicking on the Manage<\/i> button in the PowerPivot ribbon. As soon as you open it, you will notice a very similar interface to Excel. This is reading directly the Data Model I created last time.<\/p>\n To get a better view, check out Diagram View on the top right. You should see something like this:<\/p>\n <\/a><\/b><\/p>\n Diagram View is a great way to understand your entire Data Model, see what fields are related to what others and even create new relationships by dragging from one field on a table to another field in another table.<\/p>\n Switching back to Data View<\/i>, I am going to add a calculation that\u2019s going to show me any price changes since the last time the house was sold. To do that I simply right click, insert new column and then start building my expression. Because I do not have last sale prices for all my properties I need to make sure I am not dividing by zero. My expression looks something like this:<\/p>\n =IF ([LAST SALE PRICE] <>0, [LIST PRICE]\/ [LAST SALE PRICE], 0)<\/p>\n In plain English, if the value in the column [LAST SALE PRICE] is NOT 0 then return [LIST PRICE] divided by [LAST SALE PRICE], else return 0.<\/p>\n If I go back to my PivotTable report, and add it, and change its aggregation to average, I now get an idea of what the price movement has been for the different zip codes.<\/p>\n <\/a><\/p>\n By applying some quick formatting like I showed the in the previous post, I see that I have 2 zip codes for which my average house has appreciated over 200% — not something to base my entire decisions on but yet another good data point to have when making the big decision. Another interesting thing to look at is that the properties I am interested in Seattle have lost about 6% of their value since they were last sold.<\/p>\n Note: I want to point out that none of the \u201cconclusions\u201d or observations I am making can be taken just as is. My data set is only looking at properties I personally picked, houses that have been \u201cflipped\u201d increase their price dramatically, etc. Doing data analysis is not just about performing the analysis but also understanding what we are looking at \u2013just a little disclaimer<\/i>J.<\/i><\/p>\n Adding some calculated measures to my model<\/b><\/p>\n One of the great things about the PowerPivot add-in is that it allows for really easily creating measures, which are based on the aggregates of any given column. What if I want to know what the Maximum and Minimum List Prices are for each zip code?<\/p>\n By going into the PowerPivot add-in, and selecting one of the cells at the bottom of the grid (this is called the calculation area because this is where we define calculations!) I can input a simple formula like:<\/p>\n MaxPrice:=MAX([LIST PRICE])<\/p>\n and another<\/p>\n MinPrice:=MIN([LIST PRICE])<\/p>\n Go back to the PivotTable, add those two fields, and there you go: Max and Min for every zip code.<\/p>\n So much Powerpivot, so little time<\/b><\/p>\n In this blog post I covered a very simple introduction as to how the Powerpivot add-in has changed since 2010, and how it canbe used, but I really haven\u2019t even scratched the surface. Before I leave you, I would like to share some links where you can get all sorts of goodies and learn more about PowerPivot than you ever imagined. Some of these are Microsoft, some are from our good friends and hardcore PowerPivot enthusiasts who stretch the capabilities of our product in really amazing ways:<\/p>\n Microsoft Business Intelligence<\/a><\/p>\n What\u2019s new in PowerPivot in Excel 2013<\/a><\/p>\n PowerPivotPro.com by Rob Collie<\/a><\/p>\n