Power Query to only update records that have changed

Hypnopoison

New member
Joined
Oct 29, 2016
Messages
12
Reaction score
0
Points
0
Excel Version(s)
2016
Hello

I was hoping that I could ask for some help. I am building a spreadsheet to link directly to Salesforce objects. Is there a way for only the rows with updated or changed data to refresh, rather than the whole database? As you can imagine this takes a little while with the volume of data in the CRM opportunities, so I wanted to ask if there was something I could do to define 'only update amended records'.

Thanks
Debbie
 
Hello,

I know this answer comes many months after the question was posed, but on the off chance it is still of interest, here goes...

Using the primary (unique) key of the Opportunity table, do an inner join, so that the import of newer CRM opportunities are joined to the existing table. By joining on only those records in both datasets, you will obtain the subset of records that exist in both. I'm leaving out the actual details needed to revise the old records that match the primary key in a newer set, because several strategies are possible: need more information. Do you want to query each column/field to see what has changed, or are you only interested in wholesale replacement of the old record with new (revised) record? How many column/fields do you anticipate might be changed?

Even though you don't mention new records, I suspect you do want new opportunities to be captured too? If so, then a left join would be the right way to go.

It would help greatly if you could show us several Opportunity records.
 
Last edited:
Back
Top