GETPIVOTDATA - Can I get data from 2 pivot tables in 1 formula?

kittysaid

New Member
Joined
Mar 12, 2015
Messages
5
I have a spreadsheet where I download company production data from 2 sources. I use pivot tables to extract production data (Produced, Scrap, types of scrap, etc.) I have charts that uses GETPIVOTDATA formulas to get specific information about a part. I need to combine results from the 2 pivot tables. (scrap data from our plant + scrap data from another plant). It is the same part numbers, just different stages of the process. The fields of the pivot tables are exactly the same. (Filter =scrap, Column=TDATE-Month, Rows = 5digitnumber and Cshift, Sum of values = TRQTY ( which means transaction quantity). Example of a formula using one pivot table is: IFERROR(GETPIVOTDATA("TRQTY",'01 - Data Sheets'!$F$5,"5DigitJobNumber",08845,"CSHIFT",1),0). $F$5 is the pivot table location, and 08845 is the 5digitnumber of the part, and Cshift is the shift producing the production/scrap. How can I add another pivot table location $P$5 to this formula to get 1 result. Example of some of the results of formulas:
1594393551314.png
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

fhqwgads

Board Regular
Joined
Jul 17, 2018
Messages
194
Office Version
  1. 2019
Platform
  1. Windows
i couldnt follow a lot of that but in answer to your question it should be fine using GETPIVOTDATA for multiple tables in one formula. if you have trouble typing out the GETPIVOTDATA bits, just click on cells inside your pivot table when typing out the formula and it should generate it automatically. just make sure generate getpivotdata is on by clicking anywhere on your pivot table, going to the analyse tab, options and check the generate getpivotdata button
 

SpillerBD

Well-known Member
Joined
Jul 2, 2014
Messages
2,707
If the two sources are generating the same data fields, you should look into using the Get and Transform feature to bring all the data/both tables into a single table that you can create your Pivot Table from.
 

kittysaid

New Member
Joined
Mar 12, 2015
Messages
5
i couldnt follow a lot of that but in answer to your question it should be fine using GETPIVOTDATA for multiple tables in one formula. if you have trouble typing out the GETPIVOTDATA bits, just click on cells inside your pivot table when typing out the formula and it should generate it automatically. just make sure generate getpivotdata is on by clicking anywhere on your pivot table, going to the analyse tab, options and check the generate getpivotdata button
Thanks! I got it to work.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,186
Messages
5,570,744
Members
412,338
Latest member
ebf6543
Top