Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Veles
Advocate V
Advocate V

Add data to dataset on refresh rather than replace.

I can't figure out how I would go about getting this query to work.

 

I have a collection of Excel files on SharePoint that I will be pulling data from. People will login to SP to amend the files and then I'll have a scheduled refresh to pull out the data.

 

There is only one version of each file (i.e. there is no week 1 file, week 2 file, etc.), SP version history is used if there is ever a need to see past files.

 

There is a weekly call to discuss the results. Ideally we want to be able to see the previous version of the result, however as they are overwriting the file Power BI won't be able to access any history without me amending how the files themselves work.

 

This is essentially what I want to achieve in the Query

 

 

  1. Refresh schedule triggered
  2. Query takes data from all files in the folder
  3. Add on a custom column based on the current date to give the week number
  4. If this week doesn't exist in the dataset yet, add it on to the existing data
  5. If this week does exist, overwrite the existing data for that week only

 

Challenge I have is step 4 and 5.

 

I am taking data from file ABC.xlsx in week 2 I want to add that data to the existing data I've already taken from ABC.xlsx at the end of week 1. However Power BI will just overwrite the whole lot and I'll lose my existing data.

1 REPLY 1
Greg_Deckler
Super User
Super User

Seems like what you want is incremental refresh, which is only available in Premium. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.