How to use a formula in Getpivotdata data fields

perplexedphilip

New Member
Joined
Oct 6, 2009
Messages
1
I am trying to use the getpivotdata function in excel. I can use it to simply drag data from a pivot table in another file quite easily as below:

=GETPIVOTDATA("Temperature",'[20090109.xls]Sheet1'!$B4,"Date",DATE(2009,1,9),"Hour","00")

I would like to be able to make this formula more intelligent, rather than having to specify that I want data from the field "Temperature", I would like the function to use the data field specified in a separate cell. To look something like

=GETPIVOTDATA(=(B1),'[20090109.xls]Sheet1'!$B4,"Date",DATE(2009,1,9),"Hour","00")

Where B1 contains "Temperature"

I have a tried a few different things but cannot get this to work. I was hoping that someone may be able to offer advice as to how to use a simple formula in a data field of another formula.

Any help would be appreciated.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi,
I don't know if it will help, but I just tried in my french version of excel, as I'm in a francophone country, with drop down and it worked fine with the formula T(value).

Normally your formula should look like :
=GETPIVOTDATA(T(B1),'[20090109.xls]Sheet1'!$B4,"Date",DATE(2009,1,9),"Hour","00")

where T(value) cheks if a value is pointing to a text and return that text; and in B1 you should customize a dropdown menu according to your need.

Tell me if it works,
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,040
Members
449,063
Latest member
ak94

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