Pivot Table Help

optimistpessimism

New Member
Joined
Nov 3, 2022
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hello!

Instruction say I have to put the 'Total Price' (which is a calculated field) onto the 'Values' of the Pivot Table. The formula I used for the 'Total Price' is "=UnitPrice*Quantity". I manually Calculated the "Los Angeles - Whole Wheat" (293.16) as well as the "Total Whole Wheat on the West Column" (1256.4). I have noticed that the result is different when I manually calculated it. The pivot table multiplies the sum to the count of items in that field.

Pivot Table
Screenshot 2022-11-04 080822.png


Fields
Screenshot 2022-11-04 080814.png


Total Price Formula
Screenshot 2022-11-04 075632.png


Manual Calculation of Los Angeles - Whole Wheat
Screenshot 2022-11-04 080245.png


Manual Calculation of Total Whole Wheat on the West Column
Screenshot 2022-11-04 080357.png



Shouldn't the Answer be 'Sum' (manual calculation) and not 'Count*Sum' (which appears on the Pivot Table) ? Or is it correct?

Thank you very much!!

(I am not an Excel pro)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
It is not doing what you think it is doing. It is not multiplying Count x Sum of Qty x Unit Price.
What it is doing is Sum of Qty x Sum of Unit Price ?
There is no way of getting it to use anything other than the "Sum of" the fields you are using in the calculation.

The only caculations you should be using in a Pivot Table are those that work when you apply them to the SUM of the line items.
It doesn't make sense to multiple by the Sum of Unit Price.
The Price * Qty calculation needs to happen at the Detail row / line item level ie in the data that feeds into the pivot table.

You don't have the option of using Min, max or average in the calculation in case you were thinking along those lines and in any case mathematically they would also give you incorrect results.

Further reading: How to Create Excel Pivot Table Calculated Field Examples
 
Upvote 0
Solution
It is not doing what you think it is doing. It is not multiplying Count x Sum of Qty x Unit Price.
What it is doing is Sum of Qty x Sum of Unit Price ?
There is no way of getting it to use anything other than the "Sum of" the fields you are using in the calculation.

The only caculations you should be using in a Pivot Table are those that work when you apply them to the SUM of the line items.
It doesn't make sense to multiple by the Sum of Unit Price.
The Price * Qty calculation needs to happen at the Detail row / line item level ie in the data that feeds into the pivot table.

You don't have the option of using Min, max or average in the calculation in case you were thinking along those lines and in any case mathematically they would also give you incorrect results.

Further reading: How to Create Excel Pivot Table Calculated Field Examples
ohhh so you're saying that I should add another column and put the formula for the total price there? or that the pivot table is correct?

thank you for answering :>
 
Upvote 0
Yes I am saying that should add another column "to the data table" and put the formula for the total price there and not try to use a calculated field in the Pivot Table to do it.
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,044
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top