Get Pivot table data

Hi

I have the below data.

Brand Country Amount
1 400 100
1 401 150
2 400 200

I created the below pivot table.

Row Labels Sum of Amount
1 250
400 100
401 150
2 200
400 200
Grand Total 450

When I retrieve the total of brand 1 (=GETPIVOTDATA("Amount",$A$1,"Brand",1), i get the total with no problem at all. However i cannot manage to retrieve the total of country 400 by using this formula (=GETPIVOTDATA("Amount",$H$12,"Country",400). I know I can solve this by doing another pivot table but I want to know if this is solvable by using the same pivot table.

Can anyone help please?

Almir's picture

Check if column containing 400 is numeric

Check if column containing 400 is numeric. Try to put it betwen quotation marks ("400").

Did not work

I checked that it is numeric and also tried to quotation marks, but still did not work.

Almir's picture

There is no subtotal for "Country" field

Copy pivot table. Change places of Country and Brand, so you get subtotal for Country. Then create GETPIVOTTABLE. To get subtotal by Country you need subtotal in pivot table.