Pivot table calculated field is acting weird!

INN

Board Regular
Joined
Feb 3, 2021
Messages
118
Office Version
  1. 365
Platform
  1. Windows
Hi
I added a calculated filed called Total which multiples Unit * Price. When I change the function of each Unit and Price from Sum to Count for example for item A, I still get 60 but not 6. Why is that? and Why 60, should not be 30 if I mutliple the Unit * Price (3 * 10). Thank you very much.

test.xlsx
ABCDEFGHIJ
14NameItemUnitPriceRegionRow LabelsCount of PriceSum of UnitSum of Total
15MaryA110EastA2360
16LindaA210WestB115
17RajB15WestC1110
18JackD15EastD115
19BobC110CentalGrand Total56240
Sheet4
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Yup, it seems weird. I added a record to the data to make it easier to understand.

Here is what's happening with the calculated field in the PT:
The PT is summing the Price per Item, even though you think it's counting them. That's 10 +10 +53 = 73 price total. This field doesn't even need to be in the PT to make things go wonky.
It is then summing the Unit per Item. That's 1 + 2 + 12 = 15 units.
Then it multiplies them: 15 * 73 = 1095

It might be better to append your Table to have a field that multiplies the Unit field by the Price field.

{The rules of the Forum state that you aren't supposed ask the same question several times, as you did here and here. Naughty!}

MrExcel posts19.xlsx
DEFGHIJKL
4ITEMUNITPRICERow LabelsCount of PRICESum of UNITSum of Total
5A110A3151095
6A210B115
7B15C1110
8D15D115
9C110Grand Total6181674
10A1253
11
12
13ITEMUNITPRICErevenueRow LabelsCount of PRICESum of UNITSum of revenue
14A11010A315666
15A21020B115
16B155C1110
17D155D115
18C11010Grand Total618686
19A1253636
Sheet33
Cell Formulas
RangeFormula
G14:G19G14=[@UNIT]*[@PRICE]
 
Last edited:
  • Like
Reactions: INN
Upvote 0
Solution

Forum statistics

Threads
1,215,131
Messages
6,123,223
Members
449,091
Latest member
jeremy_bp001

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