- Learn
- Computer Science & IT
- Digital Skills
- Data Analysis with Spreadsheets
- Data Models and Power Pivot
Data Models and Power Pivot
AdvancedLesson 4 of 7 in Data Analysis with Spreadsheets Course
What you will learn
- Recognize the problems of copying columns into one wide table and describe what Excel's Data Model and Power Pivot do instead.
- Spot the limits of one flat table built with lookupsSee why copying product and customer details into every sales row causes repeated data, size limits and extra maintenance, and how related tables avoid it.
- Describe the Data Model and the Power Pivot toolsKnow where the Data Model is stored, how its engine holds data, and which Excel tools and versions let you build and edit it.
- Spot the limits of one flat table built with lookups
- Decide which tables record events and which describe them, then bring each table into the Data Model by the route that suits its source.
- Sort tables into fact and dimension tablesIdentify fact tables and dimension tables, state the grain of each fact table, and choose the key columns that will link them in a star schema.
- Load tables into the Data ModelPrepare clean source tables and choose between the PivotTable checkbox, Add to Data Model, Power Query and Power Pivot's import routes, then refresh the model.
- Sort tables into fact and dimension tables
- Link tables with one-to-many relationships, add a date table, and set types, names and visible fields so the model is easy and safe to use.
- Create and manage relationshipsLink a dimension's unique key to the matching fact column, follow the rules Excel's model enforces, and repair keys that do not match.
- Add a date tableBuild and mark a calendar table, relate it to the fact dates, and use its columns to group, sort and compare by time.
- Set types, names and visible fieldsGive the model correct data types, clear names, consistent formats, hierarchies and a field list that shows only what report users need.
- Create and manage relationships
- Define reusable calculations in DAX, explain how filter context and row context decide their results, and change the filters with CALCULATE.
- Write basic measuresCreate explicit measures with SUM, COUNTROWS, DISTINCTCOUNT and DIVIDE, name and format them, and build measures from other measures.
- Use filter context, row context and calculated columnsExplain why a measure gives a different result in each PivotTable cell, how row context works in calculated columns and SUMX, and when to use a column instead of a measure.
- Change the filter context with CALCULATEUse CALCULATE with simple filters, ALL and DIVIDE to build filtered totals and shares, and connect it to time intelligence.
- Write basic measures
- Build PivotTables and slicers on the Data Model, read their results correctly, and trace odd results back to the model.
- Build a PivotTable from the Data ModelInsert a PivotTable on the model, combine fields from several tables with measures, and connect slicers across reports.
- Check and extend PivotTable resultsVerify results against the source, recognize the symptoms of missing relationships and unmatched keys, and turn PivotTable cells into CUBE formulas.
- Build a PivotTable from the Data Model
- Explain what makes a data model large or slow and apply the fixes that reduce its memory use and speed up reports.
- Explain what makes a model large or slowRelate model size to columns and distinct values, and identify the calculations and layouts that slow PivotTables down.
- Shrink and speed up a modelRemove what the analysis does not need, reduce precision, choose measures over stored columns and load each table once.
- Explain what makes a model large or slow
Data Models and Power Pivot study guide
1Choose a model for related data
A sales report often needs details that live in several places: transactions in one table, product categories in another, and customer regions in a third. Copying those details into every transaction works for a small report, but creates more work as the data grows. A data model lets the tables stay separate. The first decision is whether those links and reusable calculations will make your reporting simpler.
1.1 Keep related tables separate
A flat table puts every field needed for a report in one wide table. A sales row might contain an order date and amount plus a product name, category, customer name, and region copied in with lookups. For a small, one-time report, an ordinary PivotTable on that table can be the simplest choice.
The difficulty grows when the same descriptions occur on many rows. In a million-row sales list, two category names may be repeated across a million cells. Lookup formulas also have to recalculate. If someone pastes their results as values, later changes to a product's category can leave old descriptions in the sales list.
A data model keeps the sales, product, and customer tables separate. A relationship links matching keys, such as Sales[ProductID] and Products[ProductID]. Excel can then summarize sales by a category from Products without adding Category to Sales. The relationship is used when the report is calculated; it does not merge the tables or copy their columns.
The example tables
Products contains these three rows. All amounts throughout this example use one currency.
| ProductID | ProductName | Category | UnitPrice |
|---|---|---|---|
| P1 | Pen set | Stationery | 20 |
| P2 | Notebook | Stationery | 25 |
| P3 | Desk lamp | Lighting | 80 |
Customers contains C1, Alder Studio, North; C2, Birch Clinic, South; and C3, Cedar School, North. Sales contains one row per order:
| OrderID | OrderDate | ProductID | CustomerID | Quantity | Amount |
|---|---|---|---|---|---|
| 1001 | 2026-01-05 | P1 | C1 | 2 | 40 |
| 1002 | 2026-01-05 | P2 | C2 | 1 | 25 |
| 1003 | 2026-01-12 | P1 | C2 | 3 | 60 |
| 1004 | 2026-02-03 | P3 | C1 | 1 | 80 |
| 1005 | 2026-02-10 | P2 | C3 | 4 | 100 |
| 1006 | 2026-02-17 | P3 | C2 | 2 | 160 |
| 1007 | 2026-03-02 | P1 | C3 | 1 | 20 |
| 1008 | 2026-03-09 | P2 | C1 | 2 | 50 |
Flattening these tables would put Stationery on six sales rows and Lighting on two. With relationships, Category stays on the three product rows. If P2 changes category, correct Products and refresh; reports then use its updated category.
When the model earns its setup
A worksheet stops at 1,048,576 rows and 16,384 columns. A model table supports up to 1,999,999,997 rows, though available memory is the practical limit. A 3,000,000-row CSV can therefore go straight into the model without passing through a worksheet.
Models also provide reusable measures, which are named calculations, and Distinct Count in PivotTable Value Field Settings. Separate fact tables, such as Sales and Budget, can share descriptive tables for comparison. A normal PivotTable on one range has only that range's fields available.
Choose a model when related tables, large row counts, or reusable calculations make that setup useful. You can start with existing Excel tables and Power Query results. You need clean keys and a clear link between tables; you do not need to redesign the source as a database.
Key Takeaways
- Relationships let a report combine fields without copying columns.
- A worksheet has a fixed row limit; model capacity also depends on memory.
- Use a model for related tables, large data, or reusable measures.
- An ordinary PivotTable remains useful for one small, complete table.
1.2 Find the model and its editing tools
The Data Model is stored inside the workbook file, separate from its worksheets. It holds tables, relationships, and calculations that PivotTables, PivotCharts, and CUBE functions can read. Saving the workbook saves the model too.
Its engine, often called VertiPaq, stores data column by column and compresses each column. Repeated values compress well, so the stored model can be much smaller than the source. Typical models can be roughly seven to ten times smaller than their source data. While the workbook is open, the model is held in memory. This makes scanning columns for totals fast but makes available memory important.
Power Pivot is the Excel add-in used to inspect and edit the model. To enable it in a supported Windows edition:
- Open File > Options > Add-ins.
- In Manage, choose COM Add-ins, then Go.
- Select Microsoft Power Pivot for Excel and confirm.
- Use Power Pivot > Manage to open its window.
The window offers two views. Data View shows a grid and a tab for each table. It lets you inspect loaded values and add calculations, but existing source cells are read-only. Diagram View shows table boxes connected by relationship lines. It is useful for checking which tables connect and which key columns they use. The calculation area below the Data View grid is a place to create measures.
You can carry out some model tasks from Excel itself. Data > Relationships manages links. The PivotTable dialog can add a table to the model. Power Query can also load directly into it. Power Pivot gives you the fuller editing tools for tasks such as marking a date table and hiding technical fields.
Follow the work through the tools
Power Query imports and cleans data. Its steps might remove subtotal rows, set Amount to a numeric type, and load the result. Power Pivot then supplies relationships and measures. A PivotTable uses that finished model to show results. If a source amount is wrong, correct the source or query and refresh; typing over the value in Power Pivot's grid is not a way to repair it.
Power BI uses the same modeling engine and DAX formula language, and Power BI Desktop can import an Excel workbook's queries and model. This shared foundation makes the modeling skills useful beyond an individual workbook.
Build and edit this model in Excel for Windows with Power Pivot available. Microsoft documents the features for Excel for Microsoft 365 and supported editions of Excel 2016, 2019, 2021, and 2024; availability depends on the edition. Excel for Mac does not support the Data Model.
Google Sheets has no built-in counterpart combining these relationships and DAX measures. Connected Sheets can create pivot tables over data in BigQuery. In that setup, joining tables is handled in BigQuery or through other spreadsheet methods.
Key Takeaways
- The workbook stores the model; Power Pivot edits it.
- Power Query cleans and loads data before modeling.
- Data View shows values; Diagram View shows relationships.
- Correct source values at the source and refresh.
- The model compresses columns and uses memory while open.
2Plan and load the tables
Before importing data, decide what a row means and which table owns each description. That choice determines which numbers can be added safely and which fields can filter them. You will separate transactions from descriptions, sketch their keys, and load clean tables into the workbook model. The loading route should suit the source and avoid worksheet copies that the report does not need.
2.1 Give each table a clear job
A fact table records events, such as sales or deliveries. It holds numeric values to summarize and keys identifying the things involved. A dimension table describes those things: products, customers, dates, or stores. Its key has one unique value per row; its other columns give report labels and groups.
Start by stating the grain: what exactly does one fact row represent? In the running Sales table, it is "one row per order." Every order has one product, a customer, a date, a quantity, and an amount. In another business an order may have several product lines, so "one row per order line" would be the right description. A row count means an order count only when that grain makes it so.
Do not mix detail rows with totals. If daily transactions and a monthly subtotal are loaded together, summing Amount counts some sales twice. Remove the subtotal rows during preparation. A model cannot infer that one row is only a display total.
Sketch a star schema
A star schema places a fact table in the center, linked directly to its dimensions. For Sales, draw three surrounding tables:
- Products: one row for P1, P2, and P3, with ProductName, Category, and UnitPrice.
- Customers: one row for C1, C2, and C3, with CustomerName and Region.
- Dates: one row for every day in the reporting calendar, with year and month labels.
Sales holds ProductID, CustomerID, and OrderDate to connect to them. P1 occurs once in Products and three times in Sales. That is the intended relationship between descriptions and transactions, not a duplicate-product error.
A number in a table does not make it a fact table. UnitPrice describes a product, so it belongs in Products here. Quantity and Amount describe a sale, so they belong in Sales. Keep descriptive columns used to group, filter, or label in the dimensions.
A snowflake extends the design by linking a dimension through another dimension. For example, Products could point to a separate Categories table. Excel supports this arrangement, but a simple star is easier to follow because the descriptive tables connect directly to the facts.
Compare facts at different grains
Suppose a Sales table records individual transactions and Budget records one amount per category per month. Do not join the two fact tables directly. Repeated categories and months would make a direct link ambiguous or invalid. Give them shared dimensions with unique keys: a Categories table can filter Products and Budget, while a Dates table can filter the date key used by each fact table.
A monthly budget can use a consistent date such as the first day of its month. That connects it to the calendar for month-level comparisons; it does not turn a monthly budget into daily amounts. State each table's grain and compare at a level both support.
Key values must match exactly. "P1" and "P01" identify different values even if a person reads them as the same product. Clean codes before loading, and keep the key columns that every intended relationship needs.
Key Takeaways
- State what one fact row represents before counting or summing.
- Dimensions have unique keys and supply labels and filters.
- A star links dimensions directly to a fact table.
- Keep detail and subtotal rows out of the same fact table.
- Compare separate fact tables through shared dimensions.
2.2 Load clean tables once
Give every source table one header row, one data type per column, and no blank or subtotal rows. Remove merged cells. For worksheet data, use Ctrl+T to create an Excel table and set its name in Table Design > Table Name. Names such as Sales and Products will appear in the model and in DAX, so choose them before creating formulas.
There are four useful routes into the Data Model.
| Route | What to do | Best use |
|---|---|---|
| PivotTable dialog | Insert > PivotTable > From Table/Range; select "Add this data to the Data Model" | Start a model and a PivotTable from one worksheet table |
| Power Pivot ribbon | Select a table cell; choose Add to Data Model | Add a linked worksheet table |
| Power Query | Close & Load To; select Only Create Connection and "Add this data to the Data Model" | Import and clean files, folders, and database data |
| Power Pivot import | Open Home > Get External Data in the Power Pivot window | Import through the older Table Import Wizard |
A linked table keeps the worksheet table as its source. You edit the worksheet data, then refresh the model. The two locations serve different purposes: the worksheet is the editable source, while the model supplies analysis.
Load a large sales file
For a 3,000,000-row sales CSV, use Data > Get Data > From File > From Text/CSV. Open the Power Query editor. Set key types consistently, set OrderDate to Date, and set Amount to a numeric type. Remove any totals and columns the reports do not use.
Choose Home > Close & Load To. Select Only Create Connection and also select Add this data to the Data Model. The query result now loads into the model without a worksheet table, so the worksheet's row limit does not block it. "Only Create Connection" by itself does not load rows into the model; the model checkbox matters.
For the small Products and Customers lists, format and name the worksheet tables, select a cell in each, and use Power Pivot > Add to Data Model. Open Power Pivot > Manage afterward and check that all three expected table tabs appear once.
Keep the load and refresh clear
Loading one query both to a worksheet and to the model stores a worksheet copy as well as the model data. Use that option when you need the sheet; otherwise the extra copy adds file size and remains subject to worksheet limits. Also avoid adding the same source by two different routes. Tables named Sales and Sales 1 can leave a report using the wrong copy even if both contain similar rows.
Use Data > Refresh All after changing the source. Query cleaning steps run again, the model updates, and reports built on it refresh. A renamed source column is a structural change: a query step referring to the old name can fail. Repair that step in Power Query, then refresh again. A successful initial load does not guarantee that later source changes will fit the same steps.
Key Takeaways
- Clean headers, types, and rows before loading.
- Power Query can load millions of rows directly to the model.
- Select both Only Create Connection and the Data Model checkbox.
- Check for duplicate model tables after loading.
- Refresh repeats the saved query steps.
- Repair query steps when a source column name changes.
3Connect and prepare the model
A report can combine fields only when its tables have a valid path between them. Unique keys and compatible types make that path possible; the direction of filtering explains the results. Add a complete calendar for time-based reports, then make the field list easy to use. Clear names, sensible formats, and hidden technical keys help everyone build reports from the same model correctly.
3.1 Make relationships carry filters
A relationship links matching columns so a filter on a dimension can select related fact rows. Excel supports one-to-many and one-to-one relationships. On the one side, every key value is unique; on the many side, values can repeat.
In Diagram View, drag Sales[ProductID] to Products[ProductID]. Alternatively, open Data > Relationships > New. Set Table to Sales, Column (Foreign) to ProductID, Related Table to Products, and Related Column (Primary) to ProductID. The table you select first does not decide which values may repeat: the actual keys must satisfy the relationship rules.
For the Stationery row in a PivotTable, Products keeps P1 and P2. The link then keeps Sales rows for those products. Filters travel from the one side to the many side. Sales does not send that filter onward backward into Customers. This direction matters when a measure counts rows in a dimension instead of counting customers represented in Sales.
Check the keys before connecting
- The lookup column on the one side must be unique. Blanks and empty strings together count as one blank value, so more than one is invalid there.
- The linked columns need compatible data types. Change whole-number 101 and text "101" to matching types in Power Query before creating the link.
- Each relationship uses one column. Excel does not accept a pair of columns as a composite key.
- A table cannot link to itself, and relationships cannot form a loop.
Suppose Products contains P2 twice, with two different descriptions. Removing a duplicate is safe only after deciding which record represents the product. If the rows really describe different items, give them distinct keys and use those keys in Sales. A relationship needs an unambiguous item, not simply a list shortened until Excel accepts it.
When identity depends on two fields, create one combined key in both tables. Region and month could become "North|2026-01". Use a separator and a consistent format so different combinations cannot collapse to the same code. The dimension's combined key must still be unique.
To test the relationship, make a small PivotTable using a dimension label and a fact amount. Confirm that changing the label changes the selected facts. Then inspect a known key at each end. This checks the intended meaning of the link as well as Excel's ability to create it.
A valid relationship can contain unmatched fact keys. If Sales contains P4 but Products stops at P3, P4's amount appears under (blank) in a category report. Add the missing product or correct the fact key and refresh. Hiding the blank group conceals the data problem.
Handle repeated groups and alternate dates
Products and Budget cannot relate directly on Category when both repeat it. Create Categories with one row per category and link each table to it. Categories can then filter Products, which filters Sales, and can also filter Budget. Use the shared Categories field in the comparison report.
Only one relationship between a pair of tables can be active. For OrderDate and ShipDate linked to Dates, Diagram View shows the active relationship as solid and the inactive one as dashed. A measure can select the other date path:
Sales by Ship Date :=
CALCULATE([Total Sales], USERELATIONSHIP(Sales[ShipDate], Dates[Date]))
Without a CustomerID relationship, Region on Rows can repeat the full sales total, 535, for both North and South. After linking Customers to Sales, the results become North 290 and South 245. AUTO-DETECT can suggest links when names and types suit it, but it can miss ambiguous choices. Check the actual columns in Data > Relationships; matching column names alone do not establish a valid link.
Key Takeaways
- A dimension filters related fact rows from one to many.
- The one-side key must be unique and the key types compatible.
- Unmatched fact keys can create a blank report group.
- Use a unique shared dimension when a category repeats in both tables.
- One active relationship selects the default date path.
- USERELATIONSHIP can activate an alternate path within a measure.
3.2 Build a calendar that covers every day
A date table is a dimension with one row per calendar day, including days with no transactions. Add Year, Quarter, MonthNumber, MonthName, and any other time labels the reports need. A calendar for 2026 has 365 rows; 2024 needs 366 because it is a leap year.
A list of sales dates is not a complete calendar. It leaves out quiet days and can repeat busy ones. That makes it unsuitable as the unique date dimension. A separate calendar gives Sales and Budget a shared set of month and year labels and supports DAX time intelligence.
Create and connect the calendar
You can create the daily list in Power Query or on a worksheet, load it to the model, and name it Dates. Power Pivot also offers a date-table creation command under Design > Date Table > New. Make the range cover the fact dates, usually in complete calendar years, so the first and last reporting years are usable as calendars.
Set Dates[Date] to a date type. Check that it has unique dates, no blanks, and no gaps in its daily sequence. Use Design > Mark as Date Table in the Power Pivot window and select its date column. This identifies the calendar column for time-intelligence calculations such as year-to-date totals.
Relate Sales[OrderDate] on the many side to Dates[Date] on the one side. A date table can have a perfectly clean daily key while the fact date still fails to match. For example, 2026-01-05 at 14:32 is different from 2026-01-05 at midnight. In Power Query, convert the fact date-time column to Date to remove the time part before loading. Changing only its display format does not remove the stored time.
Make months sort as months
MonthName is text, so its ordinary sort puts April before February. Select MonthName in Power Pivot's Data View and use Home > Sort by Column > MonthNumber. MonthNumber provides the ordering, while MonthName provides the readable label. Each month name must map to its intended month number.
For a report covering several years, use Year with MonthName so January from different years is not combined unintentionally. The same calendar columns can be reused by every report built on the model.
With MonthName on Rows in the running example, January contains 40, 25, and 60, totaling 125. February contains 80, 100, and 160, totaling 340. March contains 20 and 50, totaling 70. The three monthly totals give 535 overall.
Automatic date grouping can add helper columns to a fact table for a quick report. Those columns belong to that fact table. They do not supply the shared daily calendar needed to compare several fact tables consistently, and they do not replace marking the model's date table.
Key Takeaways
- Use one unique, nonblank date for every day in the calendar span.
- Relate fact dates to the calendar and mark its date column.
- Remove unwanted time parts in Power Query before matching dates.
- Sort month names by MonthNumber.
- Use Year as well as MonthName when reporting across years.
3.3 Make the field list clear and reliable
The model's field list is the report builder's working surface. Good names and visible fields make the intended choices easy; correct types and formats make those choices behave properly.
Set types in Power Query before loading where possible. In the Power Pivot window, Home > Data Type can also set a column's type. Common types include Whole Number, Decimal Number, Currency, Text, Date, and TRUE/FALSE. Types affect aggregation, sorting, and whether relationship columns are compatible.
If Amount is imported as text, dragging it into Values counts entries instead of summing the amounts. A number format showing two decimals cannot repair a text column. Change the type to Decimal Number or Currency in the source query and reload it. Conversely, an identifier can be text even when it contains digits: its job is to match a key, not to be totaled.
Name the objects before writing formulas
Rename Table1 to Sales and amt to Amount. These names appear both in the field list and in formulas, so meaningful names reduce mistakes when several tables contain similar fields. A DAX column reference includes its table: Sales[Amount]. A table name containing spaces uses single quotes, as in 'Sales Data'[Amount].
Technical keys are necessary for relationships, but often unnecessary for report users. Right-click Sales[ProductID] and choose Hide from Client Tools. Do the same for other fact keys that users should not group by. The column remains stored in the model and remains available to relationships and DAX. Hiding is a presentation choice, not a way to reduce memory.
Leave the useful dimension fields visible: Products[ProductName], Products[Category], and Customers[Region]. A product name in the dimension gives the report a readable label and can represent products with no sales when the report is configured to display them.
Set the report behavior once
Choose number formats in the model or measure settings so every PivotTable starts with consistent displays. Counts need whole numbers, amounts may need two decimals, and shares need percentages. Formatting changes presentation; it does not change the stored value or the calculation's precision.
Use Sort by Column when labels have a meaningful order. Small, Medium, and Large can sort by a SizeOrder column holding 1, 2, and 3. The label stays readable while its order comes from the numeric helper.
A hierarchy groups fields into drill-down levels. In Diagram View, select Year, Quarter, and MonthName in Dates and choose Create Hierarchy. Arrange them in that order. Adding the hierarchy to Rows lets the user expand a year into quarters and a quarter into months, without rebuilding the layout.
If inspection reveals an incorrect customer name or amount, fix the worksheet, file, or query that supplies it and refresh. Data View lets you inspect loaded source values, but it is not an editable worksheet for correcting those cells.
Key Takeaways
- A data type controls behavior; a format controls display.
- Use clear table and column names before building measures.
- Hide technical keys without deleting relationships or formula inputs.
- Model formats apply consistently across reports.
- Sort labels by a helper column when alphabetical order is wrong.
- Hierarchies provide ordered drill-down levels.
- Repair source values at the source and refresh.
4Write calculations that follow the report
A measure gives one answer for the data currently selected in a report cell. The same formula can therefore show a category total, a regional total, or a workbook-wide total. Start with reusable sums and counts, then follow how filters reach those calculations. Row-by-row expressions solve a different job, while CALCULATE lets a measure deliberately change its filters for comparisons and shares.
4.1 Create reusable measures
DAX, Data Analysis Expressions, is the formula language used by the Data Model. Function names stay in English across language versions of Excel. A measure is a named formula that returns one value for the filters currently applied. The model stores the formula and calculates its result when a report needs it.
Dragging a numeric column into Values creates an implicit measure, such as "Sum of Amount." This supplies a standard aggregation in that PivotTable. An explicit measure has a name and a formula you define, and can be reused in the workbook's PivotTables, PivotCharts, and other measures.
Create the first measures
Choose Power Pivot > Measures > New Measure. Select the home table, enter the measure name, and enter its formula. For Total Sales, the formula field is =SUM(Sales[Amount]). Set an amount format with two decimals. The home table organizes the measure; filters still come through the model's relationships.
You can also write a measure in Power Pivot's calculation area. There the combined definition includes its name and :=:
Total Sales := SUM(Sales[Amount])
Order Count := COUNTROWS(Sales)
Customers := DISTINCTCOUNT(Sales[CustomerID])
The field list's Add Measure command offers another entry point. Column references include the table name, as in Sales[Amount]. References to existing measures use just the bracketed measure name, as in [Total Sales].
In the eight-order example, Total Sales is 535, Order Count is 8, and Customers is 3. Customers counts each customer key once even when it occurs on several orders. SUM(Sales[Quantity]) gives 16; MIN(Sales[Amount]) gives 20; MAX(Sales[Amount]) gives 160. AVERAGE(Sales[Amount]) gives 66.875.
COUNTROWS counts orders here because there is one row per order. If the grain were order lines, it would count lines. DISTINCTCOUNT on the fact's customer key counts customers represented by the selected sales, which is useful when filtering by products.
Build one measure from another
Average Order := DIVIDE([Total Sales], [Order Count])
This gives 535 divided by 8, or 66.875. A display format with two decimals shows 66.88 while retaining the unrounded calculation. A change to Total Sales also flows into Average Order because the formula references that measure.
DIVIDE(numerator, denominator) returns blank when the denominator is zero or blank. Its optional third argument supplies a constant alternate result, such as zero. Use it for ratios where a denominator may be missing. Ordinary division with / can produce special values such as Infinity or NaN when division is undefined.
A measure must return a single value in each context. Writing =Sales[Amount] alone leaves Excel with many candidate amounts. SUM(Sales[Amount]) defines how to reduce them to one value. Data Model PivotTables use measures for these calculations; the ordinary PivotTable calculated-field command is not available.
Key Takeaways
- Explicit measures are reusable named DAX formulas.
- Reference columns as
Table[Column]and measures as [Measure Name]. - COUNTROWS counts the rows at the fact table's grain.
- DISTINCTCOUNT counts each selected key once.
- DIVIDE handles a zero or blank denominator.
- A measure returns one value in the current context.
4.2 Choose row calculations and report calculations
Filter context is the set of filters used to calculate a measure. Rows, Columns, slicers, report filters, and the formula itself can all contribute. In a PivotTable with Category on Rows and Region on Columns, the Stationery/North cell has both filters. They select the matching Sales rows through the relationships.
The running example gives these results for Total Sales:
| Category | North | South | Total |
|---|---|---|---|
| Stationery | 210 | 85 | 295 |
| Lighting | 80 | 160 | 240 |
| Total | 290 | 245 | 535 |
A total recalculates the measure in its own context. For Total Sales the detail cells add up, because a sum is additive across these groups. Customers is 3 for Stationery and 2 for Lighting, but 3 overall: some customers bought both. Average Order is about 49.17 for Stationery and 120 for Lighting, but 66.875 overall. Averaging the two category averages gives about 84.58.
The category averages come from different group sizes: Stationery has six orders totaling 295, while Lighting has two totaling 240. The full calculation uses 295 + 240 = 535 across 6 + 2 = 8 orders. Averaging the two displayed averages treats two Lighting orders as equally important as six Stationery orders.
Row context means the current row in a row-by-row calculation. It exists in a calculated column and inside an iterator such as SUMX. A column reference can then supply a value from that current row.
Multiply within each sale before adding
To calculate revenue from quantities and related product prices, write:
Revenue :=
SUMX(Sales, Sales[Quantity] * RELATED(Products[UnitPrice]))
SUMX visits the selected Sales rows. RELATED follows each row's ProductID to the one matching Products row. The eight products of quantity and price are 40, 25, 60, 80, 100, 160, 20, and 50. SUMX adds those row results to get 535.
Multiplying two sums does a different calculation. SUM(Sales[Quantity]) * SUM(Products[UnitPrice]) gives 16 times 125, or 2,000. It loses the pairing between each sale's quantity and its product's price.
Store a label when a report needs to group by it
A calculated column evaluates once for each row and stores the result. In Products, use:
Price Band = IF(Products[UnitPrice] >= 50, "Premium", "Standard")
P3 becomes Premium; P1 and P2 become Standard. Price Band can go on Rows or in a slicer. It is recalculated when the data refreshes and takes space like an imported column. A measure produces a result on demand for Values; it does not provide a stored grouping label.
Row context alone does not filter an aggregation. A Sales calculated column containing SUM(Sales[Amount]) therefore repeats 535 on every row in this example. Use the current row's own column for a row value, and a measure for a report total.
Key Takeaways
- Filter context selects the data for a report cell.
- Totals recalculate the measure; distinct counts and averages need not add.
- Row context supplies the current row to a calculated column or iterator.
- SUMX evaluates each row expression before adding its results.
- RELATED retrieves the matching value from a relationship's one side.
- Use columns for grouping labels and measures for report values.
4.3 Change filters for totals and comparisons
CALCULATE evaluates an expression in a changed filter context. Start with an existing measure, then specify the filters to add, replace, or remove. A simple condition replaces an existing filter on the same column; filters on other columns still apply.
Stationery Sales :=
CALCULATE([Total Sales], Products[Category] = "Stationery")
On a PivotTable's Stationery row this gives 295. On its Lighting row it also gives 295: the formula replaces the Category selection with Stationery. If Region is on Columns, the North result is 210 and the South result 85. Nothing in the formula removes the Region filter.
Multiple filter arguments must hold together:
North Stationery :=
CALCULATE([Total Sales],
Products[Category] = "Stationery",
Customers[Region] = "North")
This gives 210. A simple condition can also compare a numeric column with a fixed value, such as Products[UnitPrice] >= 50.
Choose the denominator's filters
All Product Sales := CALCULATE([Total Sales], ALL(Products))
Share of Sales := DIVIDE([Total Sales], [All Product Sales])
ALL removes filters from Products. With Category on Rows and no other filters, All Product Sales is 535 on each category row. Stationery's share is 295 divided by 535, or about 55.1%; Lighting's is about 44.9%.
Add Region on Columns. In the North column the denominator becomes 290, because ALL(Products) does not remove the Customers filter. Stationery/North is therefore 210 divided by 290, or about 72.4%. Lighting/North is about 27.6%. Naming the denominator "all sales everywhere" would misdescribe this calculation.
Show Values As > % of Column Total gives the same North comparison in this layout. % of Grand Total instead divides 210 by 535, giving about 39.3%. A reusable share measure makes the denominator's rule available to other formulas and reports, not just this PivotTable's display settings. ALL(Products[Category]) removes only the Category filter; ALL(Products) removes filters from all columns in that table.
For example, a Price Band slicer and a Category row both filter Products. ALL(Products[Category]) removes the row's category choice while keeping Price Band; ALL(Products) removes both. Choose the narrower or broader removal according to the comparison you want. A percentage can look reasonable with either denominator, so inspect its remaining filters before interpreting its label.
Keep a condition instead of replacing it
Selected Stationery :=
CALCULATE([Total Sales],
KEEPFILTERS(Products[Category] = "Stationery"))
KEEPFILTERS intersects the new condition with the existing filter. A Stationery row gives 295, while a Lighting row gives blank because no rows satisfy both category conditions.
Time-intelligence functions also change date filters. With a marked Dates table and its relationship in place:
Sales YTD := TOTALYTD([Total Sales], Dates[Date])
Prior Year Sales :=
CALCULATE([Total Sales], SAMEPERIODLASTYEAR(Dates[Date]))
Sales YTD is 125 in January, 465 in February, and 535 in March. February includes both January's 125 and February's 340. Prior Year Sales shifts the selected period back one year; it needs the earlier year's dates and sales to return that comparison.
Key Takeaways
- CALCULATE changes the filters used for an expression.
- A simple condition replaces a filter on the same column.
- ALL removes the specified table or column filters.
- A share keeps filters that its denominator does not remove.
- KEEPFILTERS intersects a condition with the current filter.
- Time intelligence uses the marked date table to change the period.
5Build reports and check their results
A model becomes useful when its fields and measures form a report you can trust. Build PivotTables with dimension labels and reusable calculations, then connect slicers to compare the same selection across views. The results also help diagnose the model: a repeated total, an unexpected blank group, or a distinct count that seems too large each points to a different check. Keep source totals close enough to verify the report.
5.1 Use dimensions for labels and measures for values
Create a PivotTable from the workbook's Data Model. Use Insert > PivotTable > From Data Model where available, or Home > PivotTable in the Power Pivot window. Excel can also expose the model through the PivotTable connection picker: choose the tables in This Workbook Data Model. The important choice is the whole model as the source.
The field list now contains several tables. Its All tab shows all model tables; Active shows those in use. Expand a dimension to find descriptive fields and expand the measure's home table to find its calculations.
Build the sales report
- Put
Products[Category]on Rows. - Put
Customers[Region]on Columns. - Put
[Total Sales]in Values.
Stationery gives North 210 and South 85. Lighting gives North 80 and South 160. Region totals are 290 and 245; the grand total is 535. Each row and column label filters Sales through its own relationship.
Add [Customers], defined as DISTINCTCOUNT(Sales[CustomerID]), to Values. Stationery has two customers in North and one in South; Lighting has one in each region. The overall total is three customers. Several report cells can contain the same customer, so distinct counts overlap even when their sales amounts do not.
Make the field choices reusable
Use dimension fields for Rows, Columns, Filters, and slicers. Use measures for Values. Products[ProductName] provides readable labels and belongs with Category in the same dimension. Sales[ProductID] is a transaction key: hiding it helps users choose the descriptive field.
Dragging Amount directly into Values creates an implicit "Sum of Amount." Value Field Settings can change its aggregation, including Distinct Count for a Data Model PivotTable. An explicit measure is a better choice when its definition and format must stay consistent across reports.
If Excel reports "Relationships between tables may be needed," inspect the keys and create the intended relationship. AUTO-DETECT can help, but verify the link in Data > Relationships. A field list showing both tables does not itself prove that one table filters the other.
Share selections across views
Insert a slicer for Customers[Region]. Select the slicer, open Report Connections, and select every PivotTable it should control. The PivotTables need to use the same Data Model. Choosing North can now filter the category report and a monthly sales report together. PivotCharts can use the same model and measures as well.
Use prepared dimension columns for grouping. Dates[Quarter] gives every report the same quarter definitions; Products[Price Band] gives them the same product groups. A hierarchy can provide year-to-quarter-to-month drill-down. Model columns make those groups available wherever needed.
Adding another PivotTable or PivotChart does not load another copy of the underlying model tables. All of these reports read the same stored data, relationships, and measures.
Key Takeaways
- Create the PivotTable on the workbook model.
- Dimension fields label and filter; measures supply Values.
- Check relationship warnings before trusting cross-table results.
- Report Connections lets one slicer control reports on the same model.
- Prepared dimension groups can be reused across reports.
5.2 Trace suspicious values and build flexible reports
Check a model against the source before trusting its more detailed views. For the running example, COUNTROWS(Sales) must be 8 and Total Sales must be 535 with no report filters. A lower row count can point to a query filter; a higher one can point to duplicate loading or repeated source rows. Compare both count and amount because one check alone can miss a problem.
Next, inspect the measure's meaning. A sum of sales is additive across disjoint category groups. A distinct customer count recalculates over all selected rows. Three customers in Stationery and two in Lighting can correctly give three overall when the groups share customers. An average also recalculates from the underlying rows, not from an unweighted average of displayed averages.
Follow three useful symptoms
A blank group. A category report's "(blank)" row can contain sales whose ProductID has no matching Products row, or whose key is blank. Check those fact keys against the dimension. Correct the source or add the missing dimension item, then refresh. Hiding the group leaves its underlying records unresolved.
The same value on every row. Check whether the row field can filter the table being measured. With no Customers-to-Sales relationship, each Region row can show the full sales total. But a valid model can also repeat a dimension count: Products filters Sales, not Customers. DISTINCTCOUNT(Customers[CustomerID]) therefore shows three customers for each Category, while DISTINCTCOUNT(Sales[CustomerID]) counts the customers who bought within that category.
Unexpected detail behind a cell. Double-click a value to use Show Details and inspect the returned fact rows. For Stationery/North, the relevant orders are 1001, 1005, 1007, and 1008; their amounts 40, 100, 20, and 50 total 210. The connection's maximum-record setting limits detail extraction. A detail sheet may contain only part of a large cell's records; compare its returned count with the measure's full count before treating it as a complete export.
Arrange a report beyond a PivotTable grid
PivotTable Analyze > OLAP Tools > Convert to Formulas replaces the PivotTable cells with CUBE formulas connected to the model. The cells can then be positioned freely in a report. A formula for the Stationery total is:
=CUBEVALUE("ThisWorkbookDataModel", "[Measures].[Total Sales]", "[Products].[Category].&[Stationery]")
It returns 295 in the unfiltered example. The connection, measure, and member text identify exactly what the cell requests. The formula still reads the model; it is not a pasted snapshot of the number.
Show Values As settings and value filters such as Top 10 remain useful for Data Model PivotTables. After Data > Refresh All, recheck counts, totals, and unmatched keys. New products, customers, or dates can change the report's groups as well as its values.
Key Takeaways
- Check unfiltered row counts and amount totals against the source.
- Read each total using the definition of its measure.
- Investigate blank groups and repeated values through keys and filter paths.
- Show Details helps trace records, but its output can be capped.
- CUBE formulas let individual report cells query the model.
- Recheck the report after refreshing new source data.
6Reduce model size and reporting work
A large row count is only one reason a model uses memory. Columns with many distinct values, stored calculations, and unnecessary copies can matter just as much. Report speed also depends on the calculation and the number of groups requested. Find what the analysis actually needs, remove expensive unused data before loading, and compare the saved size and report time after each meaningful change.
6.1 Find the columns and queries that cost the most
The model stores and compresses columns separately. A column's row count, type, encoding, and cardinality all affect its size. Cardinality means the number of distinct values. A Region column with only North and South has low cardinality even across millions of rows. An OrderID column with a different value on every row has high cardinality.
Text storage uses a dictionary of distinct strings plus compact references to them. Whole numbers can use value encoding, which can be more compact. Unique long comments or text codes are often expensive because there are many distinct strings to store. In a 3,000,000-row Sales table, a two-value Region column can be tiny beside an OrderID column with 3,000,000 distinct values.
Repeated text is still worth placing in a dimension when that is its natural home. Compression helps, but loading a description millions of times is unnecessary when a small Products table can supply it through a relationship.
Look closely at timestamps
A non-leap year has 365 days. With times to the second, there are 86,400 possible times of day and 31,536,000 possible date-time combinations across that year. A timestamp column can therefore have many distinct values even when each part is much simpler.
Splitting a needed timestamp into separate Date and Time columns lowers each column's cardinality: at most 365 dates and 86,400 times of day in this example. The pair still identifies the original date and time. Rounding the time to minutes reduces its possible values to 1,440; rounding to hours reduces them to 24. Rounding discards finer detail, so it is a different choice from splitting.
Calculated columns also occupy storage for every row. A measure stores its formula and calculates results on demand. A stored Line Total can therefore add millions of values when the report only needs their sum.
Separate storage cost from query cost
A simple SUM can scan a compressed numeric column quickly. A distinct count over a nearly unique key needs more work. A SUMX expression with expensive row-level calculations can be slow on a very large fact table. A PivotTable with OrderID on Rows can request millions of groups even when its measure is simple. The report layout affects the work Excel must do.
The whole open model uses memory. Current 32-bit Excel can use up to 4 GB of address space on 64-bit Windows, shared with open workbooks and add-ins; on 32-bit Windows the limit is at most 3 GB. This is address space, not memory reserved exclusively for the model. For large models, 64-bit Excel provides much more room, subject to the computer's available resources.
Do not judge model size from row count alone. A longer table with a few repeated values per column can use less memory than a shorter table with many unique strings. To find a useful reduction, inspect the columns and the work the slow report requests.
Key Takeaways
- Cardinality counts distinct values and strongly affects compression.
- Long, unique text columns often cost substantial memory.
- Splitting timestamps preserves detail; rounding removes detail.
- Calculated columns store row results; measures store formulas.
- Complex calculations and many displayed groups can slow a report.
6.2 Trim data while preserving the analysis
Start with the reports and calculations the model must support. Make a list of their fields, relationship keys, and required time span. Then remove unused data in Power Query before it is loaded. Hiding a field changes the field list but leaves its storage cost in place.
Prioritize high-cardinality columns that no report needs: free-text comments, audit timestamps, and fact-row IDs can be large. Keep a row identifier if users need order-level tracing. Keep every column used by a relationship or measure even if it is hidden from report users. Removing ProductID may save space, but it also removes the product filter path.
Make a sequence of small, checkable changes
- Save a baseline workbook. Record its file size and time a slow report refresh.
- Remove an unused expensive column in Power Query, reload, and save again.
- Compare the saved size, rerun the report, and check its totals.
- Continue with the next useful change, keeping enough information to explain any result difference.
Work from the largest likely costs down. Removing one unique comment column can help more than removing several small category fields. A saved workbook's size is a practical comparison for storage; timing the same report tests the query work that the change was meant to improve.
Keep only needed rows and precision
If every report covers the last three years, filter older rows out in Power Query. Loading ten years and hiding seven in a report still stores all ten. A deliberate history cutoff also changes the available analysis, so check that comparisons such as prior-year measures still have the rows they need.
When reports use dates but not times, convert a timestamp to Date. If time detail is needed, split Date and Time before considering rounding. Round to minutes, hours, or two decimal places only when the lost precision has no reporting purpose. Changing the display format alone does not remove stored precision.
For values that are only totaled, a measure can avoid a stored calculated column:
Revenue :=
SUMX(Sales, Sales[Quantity] * RELATED(Products[UnitPrice]))
This keeps the quantity-price pairing without storing Line Total on every sale. A grouping label such as Price Band still needs a column because a slicer needs stored categories. Avoid replacing useful grouping columns simply to reduce the column count.
Keep the structure compact
Load each query once to the model. Use Only Create Connection plus Add this data to the Data Model when a worksheet copy is unnecessary. Remove duplicate model tables and unused loads. Keep product descriptions in Products, where there are three rows in the example, instead of repeating them across a huge Sales table. Use compact whole-number keys or short codes where suitable, with matching types on each relationship.
If trimming still leaves the model too large for 32-bit Excel, use 64-bit Excel with enough memory and close other large workbooks. Recheck unfiltered counts, totals, and the slow report after the move so the larger capacity does not hide an unresolved data issue.
Key Takeaways
- Remove unused columns before loading, starting with costly unique values.
- Keep relationship keys and calculation inputs.
- Filter unnecessary history in Power Query.
- Reduce precision only when the analysis can lose the detail.
- Use measures for results needed only as report values.
- Compare file size, report time, and correctness after changes.
Data Models and Power Pivot examples
1Decide when related tables help
9 steps
- 1IntroductionA report needs three lists
A sales total is simple when every needed field lives in one table. A category-by-region report is different: the transaction has the amount, Products has the category, and Customers has the region.
You could copy the descriptions into Sales. A Data Model gives those tables another way to work together, using relationships between their product and customer keys, so each description is stored only once.
- 2ExampleSee what copying creates
Products has three rows: P1 Pen set and P2 Notebook are Stationery; P3 Desk lamp is Lighting. The example Sales table has eight orders.
Copying Category into Sales repeats Stationery on six rows and Lighting on two. If a copied label becomes stale, the report can keep grouping by the old category even though the product list is correct.
- 3ExplanationConnect the key, keep the description
A relationship matches
Sales[ProductID]withProducts[ProductID]. Category stays in Products; Amount stays in Sales.When a report groups by Category, the link selects the sales for the matching products. Nothing has been pasted or merged into the fact rows. Correct a category in Products and refresh to make reports use the updated description.
- 4ChallengeChoose a source for the report
A team has 2 million transactions plus separate product and customer lists. Its category and region reports must stay consistent. What makes a model useful?
---reveal---
The transactions exceed one worksheet's row limit, and relationships let the reports use descriptions from the other lists without copying them onto every transaction. The same model can also supply reusable measures to several reports.
- 5ExplanationFind where the data lives
The Data Model is stored inside the workbook, separate from the sheets. Its engine stores and compresses each column and holds the open model in memory.
Repeated categories compress well. Millions of unique strings cost more. Large row capacity therefore does not remove the need for enough memory or for sensible column choices.
- 6ConnectionUse the tools in order
Power Query imports and cleans the source data. Power Pivot edits the model's relationships and DAX measures. PivotTables and PivotCharts read the finished model.
In Power Pivot, Data View shows loaded values, Diagram View shows the links, and the calculation area holds measures. Build and edit the model in a supported Excel for Windows edition with Power Pivot available.
- 7ChallengeRepair a loaded value
Power Pivot Data View shows a customer in the wrong region. The table came from an Excel worksheet table. Where should the correction happen?
---reveal---
Correct the region in the source worksheet table and refresh the model. Data View's source cells are read-only. The report then receives the corrected description through the refreshed Customers table.
- 8ChallengeSeparate a model decision from a repair
A small complete table supports one one-time sum report, but a name is misspelled. Does the error make a model necessary, and how should it be fixed?
---reveal---
The ordinary PivotTable still fits the report. Correct the name in its source and refresh. A data error needs a source correction; related tables, large loads, or reusable calculations are the reasons to consider model setup.
- 9RecapMake the modeling decision
Choose a model when relationships, scale, or shared calculations make reporting easier. Keep descriptions in their own tables, use keys to connect them, and repair source values where they originate.
The workbook stores the model. Power Query prepares its inputs, Power Pivot edits its structure, and reports read its results.
2Plan the rows and load the model
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionStart with the row
- 2ExampleState the sales grain
- 3ExplanationGive descriptions their own tables
- 4Key InsightSketch the star
- 5ChallengeCatch a mixed grain
- 6ExplanationPrepare the source
- 7ExampleOpen the large file in Power Query
- 8ExampleChoose the model destination
- 9ChallengeExplain the missing model table
- 10ChallengeCheck the load and the meaning
- 11RecapKeep the input repeatable
3Follow keys, dates, and report fields
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionMake every filter path visible
- 2ExplanationStart with one and many
- 3ExampleFollow Stationery into Sales
- 4ChallengeRepair an unmatched product
- 5TipResolve repeated category keys
- 6ConnectionKeep an alternate date path
- 7ExplanationBuild all the calendar days
- 8ExampleRemove the stored time
- 9ChallengeFix the calendar layout
- 10ExplanationSeparate types from formats
- 11ExampleHide the technical path
- 12ExplanationPrepare drill-down levels
- 13ChallengeKeep a key without offering it as a label
- 14ChallengeDiagnose two date problems
- 15RecapCheck the path and the field list
4Predict what a DAX measure will return
19 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionOne formula, many report cells
- 2ExampleCreate Total Sales
- 3ExplanationDefine the count you need
- 4ExampleBuild a measure from measures
- 5ChallengeChoose a customer count
- 6ExplanationRead the filters in a cell
- 7Key InsightRecalculate the total
- 8ExampleKeep the quantity and price paired
- 9ExampleAdd the row results
- 10ExplanationStore a category for slicing
- 11ChallengeCatch the repeated total column
- 12ExampleReplace one category filter
- 13ExampleRemove product filters from the denominator
- 14ExampleCalculate the share
- 15ChallengePredict the retained filter
- 16Key InsightIntersect when replacement is wrong
- 17ConnectionChange the date period
- 18ChallengeChoose the intended share
- 19RecapAsk what is selected and what is stored
5Build and verify a model report
12 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionBuild a report you can explain
- 2ExampleCreate the model PivotTable
- 3ExampleRead one cell and its totals
- 4TipUse the dimension label
- 5ChallengeConnect the second view
- 6ExplanationReconcile before drilling down
- 7Key InsightDistinguish a valid total from an error
- 8ChallengeExplain the repeated customer count
- 9ExampleTrace a cell to its orders
- 10ConnectionFree the report cells
- 11ChallengeCheck the refresh end to end
- 12RecapTrust the path and the measure
6Make a large model smaller and faster
10 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionLook beyond the row count
- 2ExplanationCount different values
- 3ExampleSplit before discarding precision
- 4ChallengeExplain the slow layout
- 5ExampleRemove an unused expensive column
- 6ExplanationReduce rows and stored results
- 7ChallengeChoose what must remain
- 8TipMeasure the effect
- 9ChallengePreserve the required time detail
- 10RecapKeep the analysis, reduce the cost
Data Models and Power Pivot practice questions
Set 1: Choose tables, links, and calculations10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
COUNTROWS(Deliveries) count, and what is needed to count deliveries?Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Apply model rules to working reports10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Items[Category]?Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
DIVIDE([Total Fees], [Visit Count]). What does it return, and what happens if the count becomes zero with no alternate result specified?Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Online Fees := CALCULATE([Total Fees], Channels[Type] = "Online"). A report row selects Type = "In person", and a slicer selects Region = "East" from a separate Customers dimension. What fees does the measure calculate?Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
DISTINCTCOUNT(Customers[CustomerID]) repeats 40 on every Product Category row. Why?Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Read filters and diagnose results10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
SUM(Sales[Amount]). A PivotTable then sums that column with no filters. What result appears, and why?Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Dates[MonthName] on Rows. What two changes produce separate years and calendar month order?Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
DISTINCTCOUNT(Sales[CustomerID]) return?Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(Products))), with category in Products and region in Customers. What is A's share?Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Solve linked modeling problems10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Orders[OrderDate] and inactively to Orders[ShipDate]. Customers filters Orders by Region. An order for a West customer is dated May 30, shipped June 2, and worth 250. A second West order is dated June 5, shipped July 1, and worth 400. These are the only orders. With June and West selected, what does a sales measure using USERELATIONSHIP on ShipDate return?Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
SUM(Sales[Quantity]) * SUM(Products[UnitPrice]) with no dimension filters. What are the wrong result and the correct revenue?Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
[Sales] sums their amounts. A report row is B and its Region slicer is North. A measure divides CALCULATE([Sales], KEEPFILTERS(Products[Category] = "A")) by CALCULATE([Sales], ALL(Products)). What result does DIVIDE return?Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Transfer the ideas to new report designs10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
[Sales] sums the sales amounts. Category and PriceBand are columns of Products; Region is in Customers. A cell selects East, Premium, and A. Its denominator is CALCULATE([Sales], ALL(Products[Category])). What share does DIVIDE([Sales], denominator) return?Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Active relationship
Additive measure
Address space
Aggregation
ALL
C
CALCULATE
Calculated column
Calculation area
Total Sales := SUM(Sales[Amount]) in the calculation area to create the reusable sales measure.Cardinality
Column removal
Composite key
Connection-only load
COUNTROWS
CUBE formula
CUBEVALUE
D
Data Model
Data Model PivotTable
Data type
Data View
Date table
DAX
Denominator
Diagram View
Dictionary encoding
Dimension table
DISTINCTCOUNT
DIVIDE
E
Explicit measure
F
Fact table
Filter context
Flat table
G
Grain
H
Hide from Client Tools
Sales[ProductID] so users choose readable product labels from the dimension when building reports.Hierarchy
High-cardinality column
I
Implicit measure
Inactive relationship
Iterator
K
KEEPFILTERS
Key column
Sales[ProductID] matches a sale to the product row that supplies its name, category, and price.L
Linked table
Lookup formula
M
Marked date table
Dates[Date] before using the calendar to calculate sales accumulated from the start of the year.Model optimization
MonthNumber
N
Number format
O
One-to-many relationship
P
PivotChart
Power Pivot
Precision reduction
R
Refresh
RELATED
Products[UnitPrice]) retrieves the price for that row's ProductID.Relationship
Report Connections
Row context
Row filtering
S
SAMEPERIODLASTYEAR
Scalar value
Sales[Amount] reference gives many possible amounts, while SUM selects one aggregate result.Shared dimension
Show Details
Slicer
Snowflake schema
Sort by Column
Source data
Source reconciliation
Star schema
SUMX
T
Table Import Wizard
Time intelligence
TOTALYTD
U
Unmatched key
USERELATIONSHIP
Sales[ShipDate] and Dates[Date] so calendar filters use shipment dates.V
Value encoding
Values area
VertiPaq
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.