I am trying to limit some records that are tied to a table in excel

I have a table or spreadsheet called SF-Opportunites that has 318 opportunities in it. I want to limit the records returned in the other two tables by those OpportunityID's back to only the Accounts and Contacts those 318 records are associated with.  How do I link it to two other tables SF_Accounts & SF_Tasks that have Key Relational Fields in them in order to get only the accounts and contacts associated with them (the 318 Opportunities) and nothing else? The dataset is too large so I was able to get a good sampling of random data from the 318 opportunities that will work for my proof of concept project.

Table SF_Opportunities has
Field = AccountID
Field = ContactID
Field = OpportunityID

Table SF_Accounts has
Field = AccountID
Field = ContactID

Table SF_Tasks has
Field = ContactID
Field = OpportunityID
Field = TaskID

Once all the Accounts and Tasks that are associated with those 318 Opportunities are linked. I need all the excess records to go away...In other words, if they disappear then my overall size of the table or file is smaller. (Consequently, I am trying to get to smaller file that Salesforce.com can accept imported into their developer edition...5MB)
ALL DATA IN FILE IS FICTITIOUS.

I tried linking it to Excel and Access but kept getting the same number of records returned. Not sure how to get this done. Its either Operator error or something is wrong with my thinking? What should I be able to do in order to limit the records to just the accounts and therefore tasks if I just pull the records that match the OpportunityID's in the one table matching them to the other two tables with the Key relational fields listed?
SF_Oppty_Accts_Tasks.xlsx
Fletcher BurdineTableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?
 
abbas abdullaConnect With a Mentor Commented:
Hi,

Please check the attached solution, it's done using Power Query. The output are shown in SF_AC_Filtered & SF_TaskFiltered Sheets.
SF_Oppty_Accts_Tasks.xlsx
0
 
Fletcher BurdineTableau Trainer & Consultant Sales Exec.Author Commented:
Thank you very much sir
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.