GetPivotData Returning Error when Using Reference cell for Date

Crane

New Member
Joined
Aug 27, 2018
Messages
14
Hello,

I need some help, using getpivotdata function for the first time. My pivot looks like this:


DateCompletedGrand Total
2018/10/25

<tbody>
</tbody>
3333
2018/10/26

<tbody>
</tbody>
3737
2018/10/29

<tbody>
</tbody>
3636

<tbody>
</tbody>

I have a table where I'd like to fetch the data right beside the date when it matches:
DateCompleted
2018/10/25=GETPIVOTDATA("HostName",$A$3,"MigrationStatus","Completed","ScheduleDate","2018/10/25")
2018/10/26=GETPIVOTDATA("HostName",$A$3,"MigrationStatus","Completed","ScheduleDate","2018/10/26")

<tbody>
</tbody>

Using the above formula returns the value without errors. But when I replace the scheduledate with the cell reference, for instance, E2, which is the cell containing the date 2018/10/25, I get the "#Ref!" error. This is the formula is use:

=GETPIVOTDATA("HostName",$A$3,"MigrationStatus","Completed","ScheduleDate",E2)

Please help how to correct this. Thank you.
 
Last edited:

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Judging by the quotes in your working version, the date field is actually text, so you'd need something like this :

=GETPIVOTDATA("HostName",$A$3,"MigrationStatus","Completed","ScheduleDate",TEXT(E2,"yyyy/mm/dd"))
 
Upvote 0
Thank you, Sandy. I tried virtually everything. I read those sources as well until I finally end up here again..none worked :(
 
Upvote 0
Rory, you truly are an MVP! Can't thank you enough! Have a great year, all the best!
 
Upvote 0
Glad to help. :)
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,869
Members
449,054
Latest member
juliecooper255

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