J
JP
I'm accessing an external DB to retrieve Quantities and Unit Weights, e.g.
Customer A bought 3 items of product X, with unit weight 10, and Customer B
bought 5 items of product Y, unit weight 12. In a pivot table, I'd like to
get the total weight, so I created a calculated field, Total Weight, as
Quantity*Unit Weight.
That works fine for individual customers A and B: I get respectively 30
(3*10), and 60 (5*12). But the Grand Total of the table is wrong: instead of
90 (30 + 60), I get 176! What happens is that, to calculate the Grand Total,
the table adds all the Quantities (3+5=8), adds all Unit Weights (10+12=22),
then multiplies them (8*22=176)!
How can I use calculated fields, still get correct Grand Totals?
I'm using Excel 2003.
Customer A bought 3 items of product X, with unit weight 10, and Customer B
bought 5 items of product Y, unit weight 12. In a pivot table, I'd like to
get the total weight, so I created a calculated field, Total Weight, as
Quantity*Unit Weight.
That works fine for individual customers A and B: I get respectively 30
(3*10), and 60 (5*12). But the Grand Total of the table is wrong: instead of
90 (30 + 60), I get 176! What happens is that, to calculate the Grand Total,
the table adds all the Quantities (3+5=8), adds all Unit Weights (10+12=22),
then multiplies them (8*22=176)!
How can I use calculated fields, still get correct Grand Totals?
I'm using Excel 2003.