Ravindra BagaleCourses & study guides मराठी Track your progress

24. Power Pivot and the Data Model

Excel

24.1 Turn On Power Pivot and Meet the Data Model

Open Power Pivot and inspect the model behind a familiar report

Tara Joshi receives a small, fictional delivery-order list. It contains StoreID and ProductID instead of written-out store and product names. To produce one sales report she normally adds a City lookup and a Category lookup to every Orders worksheet row. For twelve orders that is manageable. When several reports need the same product list and store groups, maintaining separate copied lookups can make it harder to see which workbook uses the official lists. This lesson builds the same sales result using model tables and two verified relationships.

Keep the starting goal modest. You want to prove four things: your Excel client can open the Power Pivot management window, the approved worksheet tables are present in the model, the lookup relationships make sense, and a simple city breakdown matches the exact source data. The original total stays ₹2315 while Pune contributes ₹940. Those are independent evidence about the model's data and its report groups. The tab appearing in the ribbon only proves the add-in can expose its commands.

  • Excel is the workbook. It contains the sheets, tables, embedded model and the report that reads it.
  • Power Pivot is the editing environment. Open Manage to inspect model tables, relationships or calculations.
  • A model-based PivotTable is the output. Load the accepted data and confirm a known city slice before changing the report design.
Orders, Stores, and Products start as worksheet tables. Power Pivot Manage inspects their one workbook Data Model. A Data Model PivotTable then reports 2315 total and 940 for Pune.
After enabling the add-in, check that your approved workbook tables actually reached the model and the report uses it.

Separate a worksheet, an Excel Table and the workbook Data Model

A worksheet is one grid inside the file. An Excel Table is a named object over a rectangular set of worksheet cells, with headers and row membership. In the chapter we can create an Orders Table on a worksheet called Orders. The matching word makes it easy for a person to find, but the sheet and the Table are distinct objects. Model tables can be loaded from those worksheet Tables or from supported external sources. Their model data is what the model-based PivotTable reads.

Power Pivot is an add-in for supported Excel desktop installations. It offers a management window for those model tables and relationships. You can create and use some model features directly from Excel without opening that window in a supported client. You cannot use the presence of a query or an ordinary PivotTable to establish that you have the same Power Pivot authoring interface. Keep this lesson's supported Windows desktop steps separate from the paper calculations that any learner can follow.

Enable the add-in in an Excel desktop client that supports it

Use supported Excel for Windows with Power Pivot available. Microsoft lists full Power Query and Power Pivot functionality for the desktop Windows app in Microsoft 365 Apps for enterprise. Support can differ by installed edition, license, client and organization policy. Look at the actual installed Excel client and its Add-ins panel. Students using Excel in a browser or on Mac can follow the data and audit examples without assuming that the Windows COM add-in procedure is available there. Power Query support in those clients is a separate question.

  1. Open Excel for Windows and a new practice workbook. Save it in a place where you are authorized to create and edit files.
  2. Open File, Options and Add-ins. In the Manage list choose COM Add-ins, then select Go.
  3. Find Microsoft Power Pivot for Excel, or the Microsoft Power Pivot entry supplied by the installed edition. Select its checkbox and confirm.
  4. Look for the Power Pivot tab on the Excel ribbon. In its Data Model group select Manage. You should see the model editor for the active workbook.
  5. Return to the worksheet window and confirm the current workbook name. Use the workbook where you intend to load the sample inputs.

If the named component never appears, confirm you are using the supported Windows desktop app and check edition or organizational installation with the relevant support contact. Installing someone else's download is unnecessary for a supported bundled component. If the tab previously appeared but vanished after an unexpected Excel shutdown, Microsoft documents examining Disabled Items under File, Options, Add-ins and selecting Microsoft Office Power Pivot if listed. Make that recovery only on an authorized workstation and follow any local policy for disabled components. Missing permissions and a missing feature are different causes.

Use a visible result to record the first step. “The Power Pivot tab is present and Manage opened for the named practice workbook” is evidence about authoring access. “Power Pivot is on” could mean the learner found an unrelated feature inside a workbook. When you open Manage before adding any data, it may show an empty model. That is a valid starting point. Next you need evidence of the Table objects arriving. The lesson deliberately keeps these checks separate so a learner can identify where a stalled exercise actually stopped.

Enter the exact twelve-order practice fixture

Create three worksheets named Orders, Stores and Products. Put the headings and source values exactly as shown below. For this model each Orders row is one approved order. Qty means whole units in that order and Amount means its approved sales amount in whole rupees. Date means the order date. The other identifiers are codes, not quantities. This fictional dataset belongs to the numbered lessons. The overview’s three-order microcase and the final capstone's eight-order fixture have different numbers.

Orders worksheet. One verified order per original record in this sample.
OrderIDDateStoreIDProductIDCustomerIDQtyAmount
O-1012026-10-03BLK-PUN-01P01C014128
O-1022026-10-05BLK-NSK-01P02C022180
O-1032026-10-11AMN-NGP-01P03C033195
O-1042026-10-18BLK-PUN-01P04C042220
O-1052026-10-22AMN-SLP-01P02C05190
O-1062026-10-29BLK-PUN-01P01C016192
O-1072026-11-02BLK-PUN-01P02C023270
O-1082026-11-06BLK-NSK-01P04C062220
O-1092026-11-09AMN-NGP-01P01C035160
O-1102026-11-14AMN-SLP-01P03C054260
O-1112026-11-20BLK-PUN-01P03C042130
O-1122026-11-27BLK-NSK-01P02C063270
Stores worksheet. One unique StoreID per row.
StoreIDCityPlatform
BLK-PUN-01PuneFreshGo
BLK-NSK-01NashikFreshGo
AMN-NGP-01NagpurMarketRush
AMN-SLP-01SolapurMarketRush
Products worksheet. One unique ProductID per row, with sample prices in whole rupees.
ProductIDProductCategoryPrice
P01Cow Milk 500 mlDairy32
P02Grapes 500 gFruits90
P03Poha 1 kgStaples65
P04Bhakarwadi 250 gSnacks110

Type identifiers as text. Enter actual date values, using your Excel date entry conventions or the DATE function for specific examples, and format them afterward. For example, =DATE(2026,10,3) creates the first source day without guessing how the client interprets a written date. Copying a data-entry string can sometimes create text instead of a date. Check a few source values in the formula bar and confirm their model data types after loading. Keep Qty, Amount and Price numeric. The number format can show a rupee symbol but does not set the underlying data type.

Convert each worksheet range into an Excel Table with Insert Table or Ctrl+T in desktop Excel. Confirm that the selected range includes the displayed headings and exactly the intended rows. Name the Tables Orders, Stores and Products. Check their identifiers while the workbook is still simple. A starter model should not accidentally include the title of an optional notes block, a manually typed subtotal, or a blank row inserted below the source list.

Verify the differences between keys, labels and measures

Orders O-101 has store code BLK-PUN-01 and product code P01. In Stores that store code belongs to Pune. In Products P01 is Cow Milk 500 ml in Dairy. The order bought four units and recorded ₹128. Its catalog unit price in this specific fixture is ₹32, so four times 32 agrees with the recorded amount. Verify the relationship using the codes. A label such as Pune can be shared by several separate stores in a bigger dataset and cannot be trusted as a unique key without proof.

The three source Tables are designed to fit together. Orders contains four different StoreID values, and Stores contains exactly one of each. Every ProductID appearing in Orders is present once in Products. A repeated StoreID in Orders is expected. Order O-101 and another order from Pune still represent two different purchases. Duplicate dimension keys would threaten the model lookup. A repeated OrderID in fact data may be invalid in this fixture, while a different line-level export can legitimately use the same order ID on several product lines. Check the row grain before interpreting repeats.

Add the Table objects, connect their keys and build the first report

Select a cell in Orders and use Power Pivot Add to Data Model, where available. Repeat for Stores and Products. Open Manage and inspect the three loaded tables. Orders should have twelve data rows and seven columns. Stores should have four rows and three columns. Products should have four rows and four columns. The first date is October 3, 2026 and the last approved source order is O-112. A tab with the expected name can still contain an earlier or shorter extract. Use row, date and amount evidence together.

In a compatible version, open Diagram View or the Excel Data Relationships dialog. Follow the one-to-many relationship logic. Set Orders StoreID as the many-side column and Stores StoreID as the unique lookup column. Do the same with Orders ProductID and Products ProductID. Do not connect OrderID to StoreID just because they are both ID fields. Each pair has to contain the same reference key and comparable types. Check the relationship markers so you know what the UI created.

Expected model relationships for the fictional worksheet data.
Lookup table and unique keyFact table matching fieldExample report field
Stores[StoreID]Orders[StoreID]Stores City filters orders for the named area
Products[ProductID]Orders[ProductID]Products Category filters orders by group

Insert a PivotTable using the workbook's Data Model. In builds that show a From Data Model item in the PivotTable menu, choose it. Equivalent supported paths can use an existing Data Model connection. Verify you are using the current workbook's model by checking for fields from all three tables. Put Stores City in Rows and Orders Amount in Values. Select Sum when the report choice is available. Counting Amount values instead would count fact rows and answer a different question. For these clean numeric inputs the all-data sum is ₹2315.

The Orders model table has twelve rows. From the Stores lookup, Pune selects five of those Orders rows worth 940 rupees. The all-order report remains 2315.
All records should reconcile before and after you add a city field. A known five-order Pune slice is the second check.
Exact city report for this twelve-order fixture.
Stores CityOrders rowsSum of Amount in rupees
Pune5940
Nashik3670
Nagpur2355
Solapur2350
All cities122315

For a simple independent worksheet control, add =SUM(Orders[Amount]) outside the Orders Table and check ₹2315. For Pune, total the known amounts 128, 220, 192, 270 and 130. The store list tells you that these five rows use the Pune key. A valid model relationship should reproduce this result without a City helper column. That success is about the choice of reporting structure. You can still use a separate flat worksheet for evidence or export when it has an agreed purpose.

Record the result from each layer

  1. Find the add-in commands

    Power Pivot is visible. Manage opens the model editing window for the practice workbook.

  2. Confirm the inputs

    The model has Orders, Stores and Products with twelve, four and four data rows respectively.

  3. Check relationships

    Unique StoreID and ProductID on the lookup side match fields in Orders. Test each key domain against the printed source.

  4. Verify the report result

    Model-based sales total ₹2315. A Pune slice shows ₹940 over five matching Orders rows.

Run two first-model tests

Lab 1. Confirm the workspace and reproduce the baseline numbers

  1. Save a worksheet-only version of the practice workbook with the three original named Tables and import types confirmed.
  2. Enable Power Pivot in a supported desktop environment if needed. Open Manage and record which workbook it is connected to.
  3. Add the three Tables, check their exact shapes and create both relationships. Save the model as a separate ready-for-review copy.
  4. Build the city PivotTable. Verify each count and sales amount shown above. Add a product-slice check using Products Category. Dairy is ₹480 and Fruits is ₹810.
  5. Confirm the original combined total is still ₹2315. Record the results alongside the clean source version and intended audience. Retain the copy for the next lesson.

Lab 2. Trace one source edit through the model

  1. Open a disposable copy of the fully linked practice workbook. Confirm it is the expected original with total ₹2315.
  2. Change O-101 Qty from four to five and Amount from 128 to 160 on the worksheet source. This controlled case assumes the original price per unit of ₹32 still applies.
  3. Use the supported linked-table or model update sequence and refresh the PivotTable as needed. For this in-workbook fixture look at the actual updated row in the model before evaluating the report.
  4. Expect all-order sales ₹2347 and Pune sales ₹972. Dairy becomes ₹512. The counts must remain twelve raw rows and five Pune rows.
  5. Restore the original values or reopen the unchanged baseline. Show the evidence for three stages: source row, model row and recalculated PivotTable.

Report timing can differ with the way data was loaded. An in-workbook linked table, a copied table and a query connection are distinct routes. A worksheet can display the corrected number while a model-based report still holds an earlier imported result. When that happens, check actual data load and refresh first. The next lesson covers those differences. Keeping an independent accepted source totals sheet gives you a clear target while you troubleshoot.

Use a setup checklist that separates four causes of an empty report

The editing tool is present and the model is empty

When the add-in opens for a new workbook, all three inputs may still be worksheet objects. To confirm what you are seeing, switch back to the Excel window and click Orders. Verify that a contextual Table tab appears and that the Table name is Orders. Then return to the model window. If no model table is listed, use the supported Add to Data Model command with the correct worksheet source active. A worksheet tab title and its contents were evidence about the source only.

Build a control habit by asking “Where am I looking now?” The Excel worksheet shows row numbers and columns of cells. Power Pivot Data View shows the model table rows and their field names. Diagram View summarizes tables and links. A PivotTable shows results shaped by field placement and filters. Each screen can legitimately differ while representing the same approved data. A report that looks empty could come from no loaded source, an active filter or the wrong workbook. Inspect the first stage that should contain the expected object.

With Orders present in Data View, inspect its first and last accepted identifiers. The original control range has O-101 to O-112. The order numbers are formatted codes in this fixture. Their sequence helps identify the sample but does not prove a production export contains every eligible order. Validate row counts against documentation rather than inferring completeness from matching-looking endpoints. Sort or filter only a test copy if doing so makes the first and last controls easier to locate.

The model has tables but its report fields are disconnected

A report built directly from the worksheet range could show Sum of Amount for all twelve records. Its total can equal the model total because both use the same money column. This does not establish that the report can use Stores City or Products Category. The field list and report connection identify whether it is a conventional worksheet PivotTable or a model-based PivotTable. Compare a known grouped result only after checking the actual report source.

Suppose all model tables loaded but the Stores relation is absent. The PivotTable may prompt you to create a relationship. A simple grand total remains meaningful over Orders. A city field that does not filter the order rows cannot answer an approved city sales question. Confirm that the two relationship columns represent the same store entity and one side has a unique list. Keep the Orders and Stores tables named clearly so you can detect putting a similarly named column from another table into the report by mistake.

The twelve original records can test a Product relationship as well. Dairy comes from P01 and gives ₹480 from three rows. Fruits comes from P02 and gives ₹810 from four. Staples comes from P03 and gives ₹585 from three. Snacks comes from P04 and gives ₹440 from two. These four known group values all differ, which makes a failed filter easy to catch. The model’s overall total should remain ₹2315. If the city view looks right and the product view does not, inspect the Products edge independently of the Stores edge.

Expected product slice after the correct ProductID relationship is available.
Products CategoryProductIDOrders rowsSales
DairyP013480
FruitsP024810
StaplesP033585
SnacksP042440

The report uses the wrong aggregation or filter

Click a value in the PivotTable and inspect its actual value field and statistical function. A count of Amount in the clean fixture would give twelve at the grand total because all twelve cells have a value. The sum is ₹2315. Those are both sensible numbers and answer different questions. Do not infer the aggregation from the field name alone. Use a descriptive value heading that includes the measure and units. When possible, verify one raw numeric amount, one group amount and the overall total.

Use one deliberate filter rather than several while testing. With Pune active, the store lookup selects five known records. When you clear this choice, the approved total includes the other three cities again. An independent field from Products can be checked after the city control succeeds. If the PivotTable already has hidden filters, your first expected amount may belong to a narrower combination. Record the visible filter settings and inspect any connected slicer before blaming a model relationship for a difference.

Open a clean report or clear the named test filters before saving a verified baseline. A report reader may assume that the grand total covers all approved inputs. A caption or clearly shown filter can disclose a scoped selection. One colleague may be reading “Pune only” while another compares their all-city report. Data model debugging begins with identifying the scope both reports claim. Identical workbook files can show different visible scopes after different interactions.

The source change has reached one stage but not the next

Microsoft documents that an Excel Table added as a linked table is normally set to automatic updates. Power Pivot also provides a manual update mode. Check the linked table indicator and current mode before concluding that a worksheet edit failed. In a supported manual workflow use the documented update commands to synchronize the intended linked table. Then check the downstream PivotTable view and refresh it when needed. A connection using imported data has its own load and refresh path, so the worksheet and model tables can show different editions until that path finishes.

In Lab 2, the worksheet change from 128 to 160 corrects one row. If Data View still shows 128, record what happened at source load or synchronization. If Data View already shows 160 but the report still displays an older number, inspect the downstream report source, slicer and refresh. If two expectations are wrong, fix the earlier failure first. Updating a report built from the wrong model will not substitute the intended source. Confirm the loaded amount after each operation rather than clicking multiple refresh commands without checking their scope.

This three-stage checklist also helps if the table was present with the correct quantity but the amount was wrong. In the original teaching dataset the product prices agree with Qty times price for every order. In a real historical report, a catalog price may change after a sale. An old order's recorded amount can still be correct. Use the price that applied to the order or its approved recorded amount. Do not overwrite historical Amount values simply because a current Products record shows a different price.

Keep the flat worksheet calculation as an independent check when useful

In a compatible worksheet client, a separate disposable Orders copy could use a lookup for the visible city and category. The illustrative formulas below assume the original exact Excel Table names and approved lookup lists. They return a review message for missing keys. A spreadsheet user without the Power Pivot editor can still use these visible results to cross-check the hand arithmetic. A working lookup is not a prerequisite for the Data Model, and an ordinary filtered view does not become a model-based report.

=XLOOKUP([@StoreID],Stores[StoreID],Stores[City],"Review store")
=XLOOKUP([@ProductID],Products[ProductID],Products[Category],"Review product")

Only add the two helper columns on a separate worksheet comparison copy, or keep them in a separate test workbook. For the standard model lab keep the original seven Orders columns. Confirm O-101 returns Pune and Dairy, and O-102 returns Nashik and Fruits. Then compare the flat source totals with the same report filters. XLOOKUP uses the source lookup matches under its own rules. Verify the approved lookup keys are unique even if a lookup appears to return the expected first result. For build availability check the current Microsoft function page before relying on it for an exercise.

A one-time export with readable labels on every order is a valid reason to produce a flat file. A reusable model is a fit when several reports need one consistent list of store and product attributes and the original entities should stay distinct. You can produce a flat export from properly prepared data while retaining the approved relational model for other analysis. Choose the workbook shape according to the next task rather than assuming one interface should do every job.

Save, name and review the model before building other reports

Give the worksheet Table names a meaning before loading, and record which model tables they should create. If a worksheet Table later changes name, review its link and dependent references. Renaming a model table or field is also a supported operation, with possible refresh and calculation repairs afterward. Microsoft documents inspecting calculations needing updates and refreshing connected reports. One blanket rule that every formula always updates or always breaks would make the wrong promise. Test the actual workbook and refer to the approved source and model names in your notes.

Keep the exercise file small. One worksheet has a defined row limit, and an Excel model has a different storage engine with memory and file-size limits. A model can hold more rows than a worksheet grid in suitable conditions. That does not promise that any workbook will stay fast, open on every platform or be small enough for sharing. Different columns, model relationships and clients have different costs. For the first lesson prove correctness with the twelve known rows before deciding whether a larger source actually belongs in Excel.

To hand off your completed model, state the expected raw total and one declared report slice. Include the table names and keys, the approved source edition, and whether the recipient only needs to review results or author relationships. If the same workbook later feeds multiple PivotTables, an independent baseline helps a teammate see which change affects them. A small model with a documented source is easier to return to than a large workbook saved with unknown pending edits.

Use Microsoft terminology to ask for the right kind of support

A learner might send the message “the pivot is missing.” Ask them to identify the specific missing tool or result. They might mean the Power Pivot ribbon tab, a missing table in Manage, the ordinary PivotTable Insert option, or the specific model-based field list. Each was expected at a different checkpoint. Compare their starting screen with the stated procedure before deciding to reinstall an application or rebuild a workbook. Provide the observed Excel client and exact checkpoint in a support note. That makes it possible to tell an installation issue from a workbook issue.

First checkpoint to inspect when a setup exercise stops.
Observed symptomInspect firstSuccess in this workbook
Power Pivot tab is absentWindows desktop edition, COM Add-ins list and relevant Disabled ItemsManage opens from the supported Power Pivot tab
Manage opens without source dataActive workbook and actual model table loadOrders has twelve rows, Stores and Products each have four
Daily or city result looks wrongActual source, relationship and active filterPune shows five approved orders and ₹940
Fresh worksheet and model values disagreeLinked Table indicator, sync mode and model valueApproved O-101 test amount becomes ₹160 after the expected update

Check that you can reopen a clean saved workbook and find the same three model tables. Power Pivot settings about whether the ribbon is enabled are part of the installed Excel environment, while the model belongs to the workbook. A coworker opening a saved file may have different authoring access. A model object being saved does not make its authoring interface appear on every client. When sharing a training workbook, identify which user needs to edit the model and which user needs only the displayed evidence.

As a paper check, move from the names of visible items back to their definitions. If the report's Rows field says City, identify the model table containing it. If you cannot find a unique StoreID beside City in the lookup source, you have not finished checking the intended relationship. If the report's Values field says Sum of Amount, identify the entity and unit of the summed values. These checks give the writer two independent ways to confirm that the report reads the intended tables. Save the starting sample when all controls pass before building a second report.

Check two different order-level explanations

Look at Orders O-102 and O-108. Both are Nashik sales, but their ProductID values point to Fruits and Snacks respectively. Their city filter matches both because it follows StoreID. A Fruits filter matches O-102 and excludes O-108 because it follows ProductID. These independent filters can be combined. In the original fixture Nashik and Fruits together give ₹450 across two sales, O-102 at ₹180 and O-112 at ₹270. Verify that the ₹220 Snacks order stays in the all-Nashik total of ₹670 and leaves the Fruits slice.

Take a similar case from Pune. Pune and Dairy selects O-101 and O-106, whose ₹128 and ₹192 total ₹320. The overall Dairy result remains ₹480 because Nagpur O-109 contributes ₹160. This check helps you prove the relationship paths are both functioning before adding more table fields. In a workbook using an incorrect category source or no store filter, the observed result would fall back to a different approved total. A known two-filter slice distinguishes those reports more effectively than another check of the grand total.

Compare the total number of source rows to the sum of each city’s row counts. The four checked cities cover all twelve approved records in this fixture. If a time or store selection hides some facts, write the filtered scope alongside the counts. A twelve-row source and a five-row Pune report can agree without requiring the source to remove seven rows.

Keep the approved original as a separate file when you repeat the add-in exercise on another computer. Delivery of the workbook and availability of the authoring tools are independent tests.

Describe what you verified at each layer

Quiz

Does enabling the add-in prove the data is in the model?

It enables supported editing tools. Inspect Manage and verify each loaded source table and its row count before building the PivotTable.

Which lookup field pairs with Orders StoreID?

Stores StoreID contains the unique approved store identifiers. Stores City then supplies a descriptive field for filtering.

Which number checks the twelve original records?

Their sum is ₹2315. Check the approved twelve rows and each known city amount alongside that total.

Which field belongs in the PivotTable Rows area for city sales?

Stores City. Orders Amount belongs in Values using Sum. The relationship enables the city field to filter the matching Orders rows.

What proves the source edit reached the report?

After correcting O-101 to ₹160 and updating the copied report, the model should show the new row amount and Pune should reach ₹972 while order counts remain unchanged.

Interview questions and answers

How do Power Pivot and the Excel Data Model relate?

The Data Model stores related tables and calculations inside the workbook. Power Pivot is an environment that lets supported Excel users inspect and manage them.

When are lookup formulas still useful?

For an approved flat extract or a small worksheet question, a helper lookup can make a visible label convenient. A relationship fits shared model dimensions and reusable filtering across reports.

What should you see in Manage on the approved practice model?

Orders with twelve rows and seven fields, plus four rows each in Stores and Products. Confirm names, types and exact source scope.

What would you check if the Power Pivot ribbon was missing?

I would check the client, installed license, organizational availability and supported Add-ins settings, then follow the documented Windows steps for my environment.

What first result would you verify before adding measures and charts?

The approved raw total and a known dimension slice. With twelve original orders, ₹2315 overall and ₹940 for Pune establish separate input and relationship checks.

Revision cards

  • Workbook. The file can hold worksheet tables and one embedded Data Model.
  • Power Pivot. The supported Windows add-in opens the model environment and management tools.
  • Model data. Verify each approved source arrived before assuming its worksheet is connected.
  • Lookup keys. Each unique approved lookup ID can describe multiple matching Orders rows.
  • Model PivotTable. Use related lookup fields and numeric facts in the report.
  • Acceptance check. Check raw rows and money as well as an independently known filtered result.

Review the original before-and-after model illustration, try more exercises in the Excel Practice Task Hub, then continue to the detailed model loading workflow.

Microsoft references