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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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