Pivot Table One Way Lookup

pto160

Active Member
Joined
Feb 1, 2009
Messages
478
Office Version
  1. 365
Platform
  1. Windows
I am not sure if Pivot Tables are capable of this, or I need to use Power query or PowerPivot.
I have two tables. The common link between the tables is the transaction ID number. I want to compare table 1 to table 2 and not table 2 to table 1 so it is a one way lookup.
I want to pull in the month and settlement number from table 2 using the transaction ID and also the amounts. The type would be on the columns if I was using the pivot table format.
In this example, it shows transaction ID CD850, since that is in table 1 and not table 2. It does not show ZA123, as that is only in table 2 and not table 1.
Is this possible?
Book1
ABCDEFGHI
1Table 1
2ID#Cust IDCust NameInvoiceAmountType
3AB123100John Smith150GL Report
4AB123100John Smith120GL Report
5BA123101Jane Doe230GL Report
6CD850102Peter Smith350GL Report
7
8
9Table 2
10ID#AmountMonthSettlementType
11AB12370Jan 2022 DepSET010222Credit Card
12BA12310Feb 2022 DepSET020222Credit Card
13ZA12350Jan 2022 DepSET020322Credit Card
14
15What I Want
16ID#Cust IDCust NameInvoiceMonthSettlementGL ReportCredit CardDifference
17AB123100John Smith1Jan 2022 DepSET01022270700
18BA123101Jane Doe2Feb 2022 DepSET020222301020
19CD850102Peter Smith350050
Sheet1
 

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.
I done more research and I created a relationship and pivot table based on the ID# per the images below, but I am not getting the correct information. The transaction ID is unique in table 2.
Do all the columns or fields need to be unique in table 2?
Is this possible with pivot tables to get the information on "What I want"?
 

Attachments

  • Pivot Table 2 Pic.jpg
    Pivot Table 2 Pic.jpg
    88.3 KB · Views: 6
  • PivotTable Fields.jpg
    PivotTable Fields.jpg
    36.6 KB · Views: 6
Upvote 0
I think the simplest would be to import Table1 into Power Query.
Do a group by query to total the lines into a single unique line for each combination for the total value
Import Table2 into Power Query
Do a left outer join from the Table1 query to the Table 2 query ?
 
Upvote 0
Thanks. So you are saying that for example to group by query, to total the lines for example it would be
Pivot Table 2.xlsx
ABCDEF
1ID#Cust IDCust NameInvoiceAmountType
2AB123100John Smith150GL Report
3AB123100John Smith120GL Report
4
5ID#Cust IDCust NameInvoiceAmountType
6AB123100John Smith170GL Report
Sheet3


So I won't actually be using pivot tables but Power Query for this process. Is that correct?
 
Upvote 0
Thanks. I'll start learning about Power Query. I am surprised that pivot tables don't have this capability, as a simple vlookup from table 1 to table 2 to retrieve the month can achieve the same results.
I'm looking at speeding up my workbook as there is 80,000 formulas.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,580
Members
449,089
Latest member
Motoracer88

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