Calculate Difference Between Two Rows in Pivot Table (with Easy Steps)

Certainly, Pivot Table is one of the powerful features in Excel analyzing the larger dataset efficiently. What if you need to calculate the difference between two rows in the Pivot Table. This is an easy time-saving task also. Today, in this article, we’ll learn two quick and suitable steps to calculate the difference between two rows in the Pivot Table in Excel effectively with appropriate illustrations.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


2 Easy Steps to Calculate Difference Between Two Rows in Pivot Table

Let’s say, we have a dataset that contains information about several sales representatives of the Armani group. The name of the sales representatives, product types,  ordered product, and delivered the product and the revenue earned by the sales representatives are given in columns B, C, D, and E respectively. We will calculate the difference between two rows in the Pivot Table. Here’s an overview of the dataset for today’s task.

pivot table difference between two rows


Step 1: Create Pivot Table

We will create a Pivot Table to calculate the difference between two rows. Let’s follow the instructions below to create a Pivot Table to calculate the difference between two rows!

  • Firstly, you have to create a Pivot Table which is really a simple task. Keep your cursor over any cell within the dataset and then from the Insert tab, go to,

Insert → Tables → Pivot Table →  From Table/Range

pivot table difference between two rows

  • As a result, a dialog box named PivotTable from table or range will appear in front of you. From the PivotTable from table or range dialog box, firstly, select the data range in the Table/Range box. Secondly, select the Existing Worksheet under the Choose where you want the PivotTable to be placed At last, press OK.

  • After pressing OK, add (by dragging down the cursor) Name and Product to the Rows area, Values to the Columns area, and Ordered, Delivered, and Rev Earned to Values area.

pivot table difference between two rows

  • After completing the above process, you will be able to create a Pivot Table which has been given in the below screenshot.

Read More: Calculate Positive or Negative Difference Between Two Numbers in Excel


Step 2: Calculate Difference Between Two Rows in Pivot Table

After creating a Pivot Table, in this step, we will calculate the difference between two rows in that Pivot Table. Let’s follow the instructions below to calculate the difference between two rows!

  • First of all, select any cell in the Pivot Table. We will select cell I5 for the convenience of our work. After that, press right-click on your mouse, and a window will appear in front of you. From the window, firstly, select the Show Values As Further, select the Difference From option.

pivot table difference between two rows

  • As a result, a dialog box named Show Values As ( Sum of Order) ? will appear in front of you. From the dialog box, firstly, select Name from the drop-down box named Base Field. Secondly, select (previous) from the drop-down box named Base Item. We select previous because we want to calculate the difference from second row to first row.

pivot table difference between two rows

  • Hence, you will calculate the difference between two rows in the Pivot Table which has been given in the below screenshot.

pivot table difference between two rows

Read More: Excel formula to find difference between two numbers


Things to Remember

➜ While a value can not found in the referenced cell, the #N/A error happens in Excel.

➜ To create a table, you can press Ctrl + T simultaneously on your keyboard.


Conclusion

I hope all of the suitable methods mentioned above to calculate the difference between two rows in the Pivot Table will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.


Related Articles

Md. Abdur Rahim Rasel

Md. Abdur Rahim Rasel

Hi! I'm Md. Abdur Rahim Rasel. Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed my graduation in Naval Architecture and Marine Engineering(NAME) from Bangladesh University of Engineering and Technology(BUET). I have a passion for learning new things with my knowledge through perseverance and hard work.

We will be happy to hear your thoughts

Leave a reply

5 Excel Hacks You Never Knew

Genius tips to help you unlock Excel's hidden features

FREE EMAIL BONUS

ExcelDemy
Logo