Pivot Table Issues

Excel PivotTable Calculated Field Alternatives for Two-Table Models

Maira MehtabMaira Mehtab Dec 2, 2026 869 views

Question details

Find an alternative to a traditional calculated field for a PivotTable that uses two related tables.

Excel PivotTable Calculated Field Alternatives for Two-Table Models
Product
Microsoft Excel PivotTable and Data Model
Device & OS
not provided
Scenario
The user wants to calculate and summarize values in a PivotTable built from two related tables.
Observed behavior
Traditional PivotTable calculated fields do not behave as expected with the two-table model.
Before you start

Check that both tables are in the Excel Data Model and identify the columns that link them. The lookup-side key should contain unique values, and the related key columns should have compatible data types.

Solution 1Recommended

Create a DAX measure in the Data Model

Use a measure when the calculation needs to respond to PivotTable filters or use relationships between tables.

A measure calculates a result in the current filter context. The example below multiplies quantity by unit price for each Sales row and sums the results; replace the table and column names with your own.

1
Create the relationship

Open Data > Relationships, select New, and connect the matching key columns in the two tables. If the relationship already exists, verify it in the same dialog.

2
Add a measure

Open Power Pivot > Measures > New Measure. Select the Sales table, name the measure Total Sales, and enter =SUMX(Sales, Sales[Quantity] * Sales[Unit Price]) in the formula box.

3
Add it to the PivotTable

In the PivotTable Fields pane, drag Total Sales to Values. Add fields from the related tables to Rows, Columns, or Filters and check the results.

Create a DAX measure in the Data Model
Using a value from the related table: If Unit Price is in a related lookup table rather than Sales, a measure can use RELATED inside SUMX, such as =SUMX(Sales, Sales[Quantity] * RELATED(Products[Unit Price])). This requires an appropriate relationship from Sales to Products.
Free Microsoft Office alternative

Explore spreadsheet summaries with WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format support for easier migration. Use it for everyday spreadsheet summaries; it is not a fix for Excel Data Model or DAX measure behavior.

Work with spreadsheet tables and PivotTable summaries in WPS SpreadsheetsOpen and edit Microsoft Excel XLSX filesUse a familiar interface for everyday spreadsheet tasksMove everyday Office documents to a free, lightweight suite
microsoft office alternative - wps office

Frequently Asked Questions

Why use a measure instead of a calculated field?

A DAX measure is designed for the Data Model and can respond to the PivotTable's filter context and relationships. Create one through Power Pivot > Measures > New Measure.

How do I connect the two tables?

In Excel, open Data > Relationships and select New. Choose the matching key columns, making sure the lookup-side key has unique values and the key columns have compatible data types.

Can a measure use a price stored in a different table?

Yes. With an appropriate relationship, use RELATED inside a row iterator such as SUMX to retrieve the price from the lookup table for each sales row.

When is a source-table column enough?

A source column is suitable when each row can be calculated from values in that same table. Add the formula to the source table, refresh the PivotTable, and summarize the new column in Values.