Attempting to use GETPIVOTDATA to find information for an employee based on referenced date.

8BITADDICTION

New Member
Joined
Nov 29, 2021
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
Hello, I have only recently started diving into GETPIVOTDATA and I am stumped as to how to have the following happen.

I would like to have the information for an employee to show up in a cell on another sheet by referencing their name on that sheet. but because we need to deal with different data every day, It needs to reference the date that is selected.

here is the formula I have written, it does not through a #REF or any error, but it isn't showing data so the cell ends up blank.

=IFERROR(IF(GETPIVOTDATA("[Measures].[Count of Duration]",'Activity Pivot'!$A$3,"[Activity RAW].[Label]","[Activity RAW].[Label].&[ACW]","[Activity RAW].[Sort Name]","[Activity RAW].[Sort Name].&["&'Automatic (WIP)'!$D7&"]","[Activity RAW].[Date]","[Activity RAW].[Date].&["&'Automatic (WIP)'!$C$1&"]")="","",GETPIVOTDATA("[Measures].[Count of Duration]",'Activity Pivot'!$A$3,"[Activity RAW].[Label]","[Activity RAW].[Label].&[ACW]","[Activity RAW].[Sort Name]","[Activity RAW].[Sort Name].&["&'Automatic (WIP)'!$D7&"]","[Activity RAW].[Date]","[Activity RAW].[Date].&["&'Automatic (WIP)'!$C$1&"]")),"")

If anyone has been successful in having this work, please let me know!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
let excel work for you, start in an empty cell with "=" and point to the desired value in your pivottable, then ajust some parameters, add iferror, etc.
That's a lot easier then looking for your error.
 
Upvote 0
let excel work for you, start in an empty cell with "=" and point to the desired value in your pivottable, then ajust some parameters, add iferror, etc.
That's a lot easier then looking for your error.
I have done that and it works up until I try to reference my Date field. The date field is a Data Validation list. that is formatted to be a the same Date layout as the PivotTable (yyyy-mm-dd) and is set as a Date as well. I am not sure what to do with it, I tried moving the Date field on the PivotTable to Filter and then I am unable to reference it.
 
Upvote 0
i just tried it myself with such a date in a pivottable and pointing to a pivotcell and then modifying the found formula.
So i think you have to make a real date again of the cell with data-validation, like i did in AW9 and AX9
Rich (BB code):
=+GETPIVOTDATA("E",$I$1,"DATE ",AX9,"B","B","C","E","D","F")
If you use the date only once, you can integrate the formula from AW9 into the formula above.

Map1
ATAUAVAWAX
1janformula by pointing4
2feb
3mrtdata validation2022-mrt-26
4apr
5mei102022
6jun3
7jul26
8aug
9sep1026/03/2022
10okt
11nov
12dec
Blad1
Cell Formulas
RangeFormula
AX1AX1=+GETPIVOTDATA("E",$I$1,"DATE ",DATE(2022,5,9),"B","D","D","F")
AW5AW5=+GETPIVOTDATA("E",$I$1,"DATE ",DATE(AX5,AX6,AX7),"B","B","C","E","D","F")
AX5AX5=--LEFT($AX$3,4)
AX6AX6=MATCH(MID($AX$3,6,3),$AT$1:$AT$12,0)
AX7AX7=--RIGHT($AX$3,2)
AW9AW9=+GETPIVOTDATA("E",$I$1,"DATE ",AX9,"B","B","C","E","D","F")
AX9AX9=DATE(LEFT($AX$3,4),MATCH(MID($AX$3,6,3),$AT$1:$AT$12,0),RIGHT($AX$3,2))
AT1:AT12AT1=TEXT(DATE(0,ROW(),1),"mmm")
Cells with Data Validation
CellAllowCriteria
AX3:AX4List=$G$2:$G$100
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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