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

Certainly, the 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.

## Calculate Difference Between Two Rows in Pivot Table: 2 Easy Steps

Letâ€™s say, we have a dataset that contains information about several sales representatives of the Armani group. The names of the sales representatives, product types, Â ordered product, and delivered 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.

### 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

• 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.

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

### 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 before you. From the window, firstly, select the Show Values As Further, select the Difference From option.

• 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 the previous because we want to calculate the difference from the second row to first row.

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

• Similarly, we will calculate the difference for the rest of the columns between two rows in the Pivot Table.

## Things to Remember

âžœ While a value can not be 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.

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

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdur Rahim Rasel

MD. ABDUR RAHIM is a marine engineer proficient in Excel and passionate about programming with VBA. He views programming as an efficient means to save time while managing data, handling files, and engaging with the internet. His interests extend to Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning, reflecting his versatile skill set. He earned a B.Sc in Naval Architecture & Marine Engineering from BUET, and now he has become a content developer, creating technical content... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF