Pivot Table: Percentage Difference between Two Columns – 2 Methods

 

The following table contains selling and cost prices of different products.

pivot table percentage difference between two columns

 


Method 1 – Using the ‘Fields, Items, & Sets’ Option to Calculate the Percentage Difference between Two Columns in a Pivot Table

 

pivot table percentage difference between two columns

Step 1: Creating a Pivot Table

  • Go to the Insert Tab >> Tables Group >>PivotTable Option.

fields, items, & sets option

The PivotTable from table or range dialog box will be displayed.

  • Select the range, click New Worksheet, and click OK.

fields, items, & sets option

A new sheet with PivotTable, and PivotTable Fields will be displayed.

pivot table percentage difference between two columns

Step 2: Calculating the Percentage Difference in the Pivot Table

  • Drag Product to Rows, Selling Price and Cost Price to Values.

fields, items, & sets option

You will see the following pivot table.

fields, items, & sets option

  • Go to the PivotTable Analyze Tab >> Calculations >> Fields, Items, & Sets >> Calculated Field.

fields, items, & sets option

  • Name of the new column % Change in the Name box.
  • Enter =( in the Formula box.

pivot table percentage difference between two columns

  • Select the Selling Price in Fields box and click Insert Field.

fields, items, & sets option

The field is added to the formula.

fields, items, & sets option

  • Enter the rest of the fields into the Formula box:
=(Selling Price-Cost Price)/Cost Price
  • Click OK.

fields, items, & sets option

A new column with the results is displayed.

pivot table percentage difference between two columns

  • Right-click a cell in the Sum of % Change column and select Number Format.

fields, items, & sets option

  • In Format Cells, select Percentage.
  • Choose the Decimal Places (here, 2).
  • Click OK.

fields, items, & sets option

This is the output.

fields, items, & sets option

Read More: Excel Pivot Table: Difference between Two Columns


Method 2 -Using the % Difference From Option to Calculate the Percentage Difference between Two Columns

Modify the dataset like the following: combine selling and cost prices in the Value column and enter prices in the Price column.

pivot table percentage difference between two columns

Steps:

  • Follow Step 1 in Method 1 to create the Pivot Table.

% difference from option

  • Drag Product to Rows, Price to Columns, and Value to Values.

% difference from option

  • Drag Value to Values again.

pivot table percentage difference between two columns

You will see the Pivot Table.

% difference from option

  • Go to the PivotTable Analyze Tab >> PivotTable >> Options.

% difference from option

  • Select Totals & Filters and uncheck the options under Grand Totals.
  • Click OK.

% difference from option

No totals are displayed, only the Sum of Value2.

pivot table percentage difference between two columns

  • Click Sum of Value2.

% difference from option

  • Select Value Field Settings.

% difference from option

  • Change the name Sum of Value2 to % Change in Custom Name.
  • Click Show Values As.

% difference from option

  • Select Price in Base field and Cost in Base item.
  • Click OK.

% difference from option

You will see the following percentage differences between selling and cost prices.

pivot table percentage difference between two columns


Practice Section

Practice here.

% difference from option

Read More: Calculate Difference Between Two Rows in Pivot Table


Download Workbook


<< Go Back to Pivot Table Calculations | Pivot Table in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo