Pivot Table Issues

How to Create an Excel PivotTable Calculated Measure for Order Fulfillment

Chanuka GeekiyanageChanuka Geekiyanage Oct 23, 2026 869 views

Question details

The user needs to build a calculated measure in an Excel PivotTable to determine how order quantities should be allocated from available inventory.

How to Create an Excel PivotTable Calculated Measure for Order Fulfillment
Product
Excel
Device & OS
not provided
Scenario
Tracking order fulfillment and inventory allocation across different manufacturers, products, and order buckets.
Observed behavior
A dynamic calculation is needed to compare the cumulative available inventory against quoted quantities and display the remaining balances within a PivotTable or PivotChart.
Before you start

Ensure your inventory source data is structured in a flat tabular format without blank rows or columns, and format it as an official Excel Table by pressing Ctrl+T before proceeding to data modeling.

Solution 1Recommended

Use Power Pivot and the Data Model to Create a Calculated Measure

This is the most robust method for handling complex fulfillment logic, allowing you to use DAX formulas to compare cumulative available inventory against quoted quantities dynamically.

By loading your data into the Excel Data Model, you gain access to Data Analysis Expressions (DAX). DAX measures are processed at the aggregation level, making them ideal for tracking running balances and fulfillment across different manufacturers and order sequences.

1
Load data into the Data Model

Select your formatted Excel Table, go to the 'Power Pivot' tab on the ribbon, and click 'Add to Data Model'. If you do not see the Power Pivot tab, enable it via File > Options > Add-ins > COM Add-ins.

2
Create the DAX Measures

In the Power Pivot window, click below your data columns in the Calculation Area. Create your first measure for Available Quantity by typing: AvailableQty:=SUM([Available]). Repeat this for Quoted Quantity: QuotedQty:=SUM([Quoted]).

3
Calculate the Remaining Balance

Create a third measure to evaluate the fulfillment. For example: RemainingBalance:=[AvailableQty]-[QuotedQty]. You can also use DAX IF statements to prevent negative inventory tracking if orders exceed supply.

4
Insert the PivotTable

Click 'PivotTable' from the Home tab of the Power Pivot window. Place it on a new worksheet. Drag your Manufacturer and Product fields into the Rows area, and your newly created Measures (indicated by an fx icon) into the Values area.

Use Power Pivot and the Data Model to Create a Calculated Measure
Sample Workbook Setup: For optimal results, ensure your source data clearly defines the order sequence and inventory allocation rules before building your PivotTable.
Powerful Data Analysis

Effortlessly Manage Order Fulfillment with WPS Spreadsheet

WPS Spreadsheet provides comprehensive data analysis tools, including advanced PivotTables and Calculated Fields, to help you track inventory allocations and order balances efficiently.

  1. 1. Open your inventory data: Launch WPS Spreadsheet and open your inventory and order data file.
  2. 2. Insert a PivotTable: Select your entire dataset, go to the 'Insert' tab, and click 'PivotTable'.
  3. 3. Set up your layout: Drag fields such as 'Manufacturer' and 'Product' to the Rows area, and 'Available Inventory' to the Values area.
  4. 4. Create a Calculated Field: Navigate to the 'Options' tab under PivotTable Tools, click 'Calculations', choose 'Insert Calculated Field', and enter your allocation formula to track fulfillment.
Completely free and lightweight office suiteFully compatible with Microsoft Excel (.xlsx) formats and standard formulasRobust PivotTable tools to build calculated fields for order managementIntuitive, tabbed user interface for seamless data modeling
microsoft office alternative - wps office

Frequently Asked Questions

What is the difference between a Calculated Field and a Calculated Measure?

A Calculated Field is a standard Excel PivotTable feature that performs row-by-row mathematical operations on existing fields. A Calculated Measure (or DAX Measure) is created in Power Pivot or the Data Model to perform highly customized, context-aware aggregations like cumulative totals across specific filters.

Why is the 'Calculated Field' option grayed out in my PivotTable?

The Calculated Field option is automatically disabled if your PivotTable is connected to the Data Model (OLAP cube). To perform custom calculations in a Data Model PivotTable, you must create a new Measure using Power Pivot instead.

Can I calculate running totals for fulfillment without using DAX measures?

Yes. In a standard PivotTable, add your 'Quantity' field to the Values area, right-click any value in that column, select 'Value Field Settings', go to the 'Show Values As' tab, and choose 'Running Total In' from the dropdown list.

How do I prevent negative inventory balances in my calculations?

You can use an IF function within your formula. For example, in a Calculated Field, you can use =IF(Available-Quoted<0, 0, Available-Quoted). This ensures your remaining balance stops at zero rather than displaying negative quantities.