GETPIVOTDATA looking for "" when pivot table uses "(blank)"

j2yuj2yu

New Member
Joined
Oct 18, 2017
Messages
2
Hi everyone,

I have a pivot table where some of the items in the row fields are blank. Here's an example:

Excel 2010
ABCD
12BGoletaCA120
13D#REF!
14D(blank)(blank)300

<tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
D12=GETPIVOTDATA("Total",$A$3,"Customer",A12,"City",B12,"State",C12)
D13=GETPIVOTDATA("Total",$A$3,"Customer",A13,"City",B13,"State",C13)
D14=GETPIVOTDATA("Total",$A$3,"Customer",A14,"City",B14,"State",C14)

<tbody>
</tbody>

<tbody>
</tbody>

Questions:

1. Why does Excel put "(blank)" in the pivot table? Is there an option to set it to "" instead?
2. Because the data for Customer, City and State comes from a database, I'd rather not be massaging the data replacing "" with "(blank)". Any suggestions?
3. Is there a better way to a multi-criteria lookup? I chose GETPIVOTDATA because it seemed to be very quick and not require a lot of CPU power. Is there another formula I could look at?

BTW, I noticed that GETPIVOTDATA("Total",$A$3,"Customer",A14,"City",,"State",) works, too. That doesn't work well with formulas, though.

Thanks in advance.

Jimmy
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Welcome to the forum.

You could amend your formula like this:

=GETPIVOTDATA("Total",$A$3,"Customer",IF(A12="","(blank)",A12),"City",IF(B12="","(blank)",B12),"State",IF(C12="","(blank)",C12))

or this:

=GETPIVOTDATA("Total",$A$3,"Customer",IF(A12="",,A12),"City",IF(B12="",,B12),"State",IF(C12="",,C12))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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