In Power Pivot, an aggregated calculation for a PivotTable is usually a DAX measure, often informally called a calculated field. In Excel for Microsoft 365 on Windows, create one with Power Pivot > Measures > New Measure; use a calculated column instead when you need a result stored for each row.
What “calculated field” means in Power Pivot
The phrase can refer to two different Excel features. A standard PivotTable built from a worksheet range has a Calculated Field command for a simple formula based on fields in its source data. Power Pivot uses a Data Model, where the corresponding way to define an aggregate is a measure: a DAX formula evaluated as the PivotTable is filtered and grouped.
That distinction matters because a conventional PivotTable calculated field is not the right tool for a PivotTable connected to the Data Model. If you want a reusable total, ratio, count, or other summary in a Power Pivot PivotTable, create a measure. If you want to calculate a value on every record and use it as a row-level field, create a calculated column.
Microsoft terminology and older tutorials can be confusing: they may use “calculated field” loosely for a measure, or refer to measures as calculated fields. Look at where the formula is evaluated, rather than relying on the label. A measure returns a summary in the current report context; a calculated column produces a value for each row in its table.
Measures and calculated columns are different
A measure is calculated when a PivotTable cell requests a result. Its value can change when you add a product, month, or region to the rows, columns, filters, or slicers. Measures are generally the right choice for totals and ratios because they aggregate according to the current selection instead of saving a repeated result for every record.
A calculated column is computed row by row and stored in the Data Model. It can be used as a PivotTable row or column label, filter, or slicer field. Because it stores results across the table, a calculated column can use more model memory than an equivalent measure, especially in a large model. It also does not automatically recalculate to represent each PivotTable cell’s filter context.
- Use a measure for values such as total sales, average price, or profit margin.
- Use a calculated column for a row-level classification such as a year extracted from a date, or a line amount calculated from quantity and unit price.
- Use a source-data column rather than either option when the value is part of the underlying record and should be maintained outside the model.
Create a Power Pivot measure
First make sure the relevant Excel table is included in the Data Model. When inserting a PivotTable, choose the option to add the data to the Data Model, or add an existing table through Power Pivot. Then create the measure in Excel for Microsoft 365 on Windows:
- Select a cell in a PivotTable that uses the Data Model, or open the model with Power Pivot > Manage.
- Choose Power Pivot > Measures > New Measure. Depending on the ribbon layout, the Measures group may be visible on the Power Pivot tab after the add-in is enabled.
- In the New Measure dialog, choose the table to hold the measure, enter a measure name, and type the DAX formula. Choose a number format that suits the result, such as Currency or Percentage.
- Confirm the dialog. The measure appears in the PivotTable field list, usually with a calculator icon. Drag it into Values and arrange the other fields to inspect how it responds to grouping and filters.
The selected table is where the measure is organized in the field list; it does not mean the formula can only refer to that table. DAX measures can use columns from related tables when the model relationships are set up correctly. A measure is not written into a worksheet cell like an ordinary Excel formula.
Examples: totals, ratios, and row calculations
Suppose the Data Model has a table named Sales with a numeric Amount column. With sales records in the Sales table and their values in Sales[Amount], enter this measure formula to sum the amounts:
=SUM(Sales[Amount])
Name the measure Total Sales and set its format to Currency. If the PivotTable lists years down the rows, the measure shows a separate total for each year; if you add a region filter, it recalculates for the selected region. The formula does not need a separate version for every year or region.
For a ratio, suppose Sales also contains numeric columns named Profit and Amount. With profit and sales amounts on each Sales row, create this measure to calculate total profit divided by total sales:
=DIVIDE(SUM(Sales[Profit]),SUM(Sales[Amount]))
Name it Profit Margin and format it as Percentage. DIVIDE is useful for avoiding a divide-by-zero error; when the denominator is zero or blank, it returns blank by default. This is a ratio of totals, not an average of each row’s margin, which is generally the meaningful calculation when records have different sales values.
For a row-level result, suppose each Sales row has Quantity and UnitPrice columns. With those two columns in the same Sales table, this calculated-column formula returns the line amount for each row:
=Sales[Quantity]*Sales[UnitPrice]
Create it as a calculated column in the Power Pivot table, not as a measure. You can then sum the resulting column in a PivotTable, though a direct measure can often avoid storing the extra per-row values. If discounts, taxes, or returns affect the definition of sales, include those business rules in the appropriate calculation rather than assuming quantity multiplied by price is the final amount.
Filter context explains changing results
The main reason to use a measure is that its result is evaluated in filter context. In a PivotTable, the row and column headings, report filters, slicers, and related-table selections can all affect the rows included in a measure. The same Total Sales measure can therefore show a grand total, a product subtotal, or a month-specific amount without changing its formula.
This behavior can surprise people who expect a measure to calculate once and keep the same value everywhere. It is not a fixed cell reference. A measure is a definition, and each PivotTable cell asks for the result under its own context. DAX functions such as CALCULATE can deliberately change that context, but basic measures often need only aggregation functions such as SUM, COUNTROWS, or DISTINCTCOUNT.
Relationships are important to this behavior. If a Calendar table is related to Sales by date, a year field from Calendar can filter Sales measures. If the relationship is missing, inactive, or connects the wrong columns, the measure may repeat the same total for every year or return unexpected results. Check the model’s relationships before rewriting a formula to compensate for incorrect model structure.
When to use a calculated column instead
Choose a calculated column when the output belongs to an individual record. Examples include a label such as “Late” for an order based on its due date, a date component used to group records, or a line-level amount that users need to inspect. Calculated columns can also provide fields for slicers and PivotTable labels, roles that measures do not fill in the same way.
Calculated columns are computed when the model is processed or refreshed, rather than recalculated independently for every PivotTable cell. They can make the model larger, so avoid adding columns just to reproduce totals that a measure can calculate. If a value can be prepared in the source system or a Power Query transformation and does not need DAX behavior, that may be a clearer place to create it.
There is also a practical difference in how users see the result. A column has a value for each row and can be placed in the Rows area; a measure belongs in Values. A measure can be used to summarize data dynamically, but it is not a substitute for a category field such as product type or transaction date.
Common problems and how to fix them
- The New Measure command is missing. Confirm that the Power Pivot add-in is available and enabled, and that the workbook contains a Data Model. In Windows Excel, manage COM add-ins through File > Options > Add-ins; if needed, use the Manage list to select COM Add-ins and choose Go. Work or school policies can affect add-in availability.
- The measure does not appear in the PivotTable. Refresh the field list or reopen the PivotTable, check that it is connected to the workbook’s Data Model, and look under the table selected in the measure dialog. A measure created for the model will not necessarily appear in a PivotTable built only from a worksheet range.
- The same number appears on every row. Check whether the fields used for grouping come from a related table and whether the relationship is valid. A disconnected table cannot filter the Sales table through a relationship that does not exist.
- The result is a percentage of the wrong kind. Distinguish a ratio of totals from an average of row-level percentages. For example, a simple average gives a small transaction the same weight as a large one; total profit divided by total sales weights the result by sales amount.
- The formula reports an error. Check table and column names, spelling, data types, and whether the referenced columns are in the model. DAX uses table-and-column references such as Sales[Amount], which differ from ordinary worksheet references such as B2:B20.
How it compares with a standard PivotTable calculated field
A standard PivotTable calculated field is created from the PivotTable’s Analyze tab, in the Fields, Items & Sets options, when the PivotTable is based on a conventional range or table. It works with the fields in that PivotTable’s source and is suited to relatively simple calculations. It is not the Data Model measure feature, and it does not provide the same DAX capabilities or model-wide reuse.
For a Data Model PivotTable, create a measure instead. Measures can be reused in other PivotTables connected to the same model and can evaluate against related tables. DAX also supports more advanced patterns, although advanced calculations may require careful modeling and testing. If you are following a tutorial, first check whether its PivotTable is based on a worksheet range or the Data Model; the correct command depends on that choice.
Availability on Mac and Excel for the web
Power Pivot authoring and its full model-management interface are Windows desktop features. Excel for Mac and Excel for the web do not provide the same Power Pivot window and measure-creation workflow as Excel for Microsoft 365 on Windows. A workbook containing a Data Model may have limitations when opened in another Excel edition, and feature support can change over time, so verify the capabilities of the specific version before planning a model workflow.
If you need to create or edit DAX measures, use a supported Windows desktop edition with Power Pivot available. A Mac or web user may be able to work with parts of a workbook, but should not assume that the Windows instructions or ribbon commands exist there. For shared workbooks, agree on an authoring environment and test that the intended users can refresh and view the model.
Frequently Asked Questions
Is a Power Pivot calculated field the same as a measure?
Usually, when someone says “calculated field” in a Power Pivot context, they mean a measure. The precise term for an aggregated DAX calculation in a Data Model PivotTable is measure; a calculated column is a separate row-by-row feature.
Can I use a regular PivotTable calculated field with Power Pivot?
No. A PivotTable connected to the Data Model uses measures for aggregated calculations. The standard Calculated Field command is for conventional PivotTables based on a range or table, not a Data Model PivotTable.
Why does my measure change when I filter the PivotTable?
That is expected. The measure is recalculated under the current filter context, which can include row labels, column labels, slicers, filters, and relationships in the model.
Can I put a measure in the Rows area?
Measures are designed to return values in the Values area. For categories or labels in Rows, create or use a column. Measures can be displayed alongside row fields, but they do not function as ordinary category fields.
Should I create a measure or a calculated column for profit margin?
For an overall or grouped margin, use a measure that divides total profit by total sales. A calculated column is appropriate only if you specifically need a margin value on every individual record; averaging those row margins may not equal the overall margin.
Related
- Excel Text on a New Line in the Same Cell: A Guide
- Excel Text Box Linked to Cell: Setup, Uses, and Fixes
- Excel Time to Number: Convert Hours, Minutes, and Seconds
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Google Sheets Scatter Chart: Fix Common ProblemsTo fix a Google Sheets scatter chart, put numeric X values in one column and numeric Y values…
- Excel Pivot Table Date Range: How to FilterTo filter an Excel PivotTable to a date range, open the drop-down for the date field in the…
- Create a Pivot Chart in Excel: Step-by-Step GuideTo create a PivotChart in Excel for Microsoft 365 on Windows, select a cell in your data, choose…
- Excel Chart Not Plotting Zero Values? How to Fix ItExcel normally plots numeric zero values, but a zero can be hard to see: a zero-height column has…
- Can You Rotate a Pie Chart in Excel? Steps and TipsYes. In Excel for Microsoft 365 on Windows, select the pie chart, right-click a slice, choose Format Data…
- Histogram in Excel Without ToolPak: A Step-by-Step GuideYes. You can make a histogram in Excel for Microsoft 365 without the Analysis ToolPak: select your numeric…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.