Getpivotdata - obtaining single line item or total with the same formula

danaya

New Member
Joined
Jun 12, 2006
Messages
13
Hello,

I'm building a simple excel dashboard, which I'm basing off of a large pivot table and the output is using Get Pivot command and the user parameters are passed into the get pivot command.

Here is simple example: =GETPIVOTDATA("Sales $",$A$3,"Branded","NO")

So the user would pick YES or NO for Branded through a radio buttons or something similar. My issue is that I would like one of the options to be "ALL". I can't figure out a way to do this using the same GETPIVOTDATA statement.

I searched around on the forums and their their seem to be techniques like using arrays, but I feel there is probably some native get pivotdata functionality that exists for this seeming simple task.


Thanks for you help.


Daniel
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Assuming you have a cell with the appropriate value in it, you could use something like:
=IF(F1="ALL",GETPIVOTDATA("Sales $",$A$3),GETPIVOTDATA("Sales $",$A$3,"Branded",F1))
 
Upvote 0

Forum statistics

Threads
1,215,206
Messages
6,123,638
Members
449,109
Latest member
Sebas8956

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