How to Create an Excel PivotTable Calculated Measure for Order Fulfillment
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.

- 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.
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.
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.
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.
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]).
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.
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 a Standard PivotTable Calculated Field
If you do not need advanced DAX aggregations and simply want to subtract ordered quantities from available inventory row-by-row, standard calculated fields can provide a quick solution.
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. Open your inventory data: Launch WPS Spreadsheet and open your inventory and order data file.
- 2. Insert a PivotTable: Select your entire dataset, go to the 'Insert' tab, and click 'PivotTable'.
- 3. Set up your layout: Drag fields such as 'Manufacturer' and 'Product' to the Rows area, and 'Available Inventory' to the Values area.
- 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.

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.




