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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Is it possible to keep data even if the source file is deleted?

I have a number of .CSV files I reference and am wondering if it is possible to configure Power BI so it imports those .CSV files and doesn't delete the data when I delete the source file. I'd like it all to be stored in the data model and only refresh if the source file changes in some way but not if it is permanently deleted.

1 ACCEPTED SOLUTION

Hi pbiuser2,

 

If you are connecting to a folder, which has been loaded into power bi is the absolute path of files in the folder, not the file itself. So once file has been removed, you should delete the path of that file in advanced editor.

 

In addtion, if you want to save file in power bi, you can import that file directly and then save your report as a PBIX file which means you can see the content of the file in power bi next time even the file has been removed.

 

Hope this is helpful.

 

Jimmy Tao

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

The proper way to do this is, once the file has been loaded, go back in Power Query, right click on the Request and uncheck soemthing like "Include in the update of the report" :

include.png

Anonymous
Not applicable

@v-yuta-msft

 

If I delete a .CSV file in a folder that is being referenced in Power BI, I am seeing that said data disappears in my Power BI data model once it refreshes. Is there any way to force Power BI to store the data within the file itself without removing it once the original source is deleted from the folder?

 

Basically, I want to disassociate my data from the source to ensure I don't lose history if I accidentally delete a file.

Hi pbiuser2,

 

If you are connecting to a folder, which has been loaded into power bi is the absolute path of files in the folder, not the file itself. So once file has been removed, you should delete the path of that file in advanced editor.

 

In addtion, if you want to save file in power bi, you can import that file directly and then save your report as a PBIX file which means you can see the content of the file in power bi next time even the file has been removed.

 

Hope this is helpful.

 

Jimmy Tao

In case I do not delete the entire file but some of the records it contains, how do I preserve the deleted records?

renecernitz_0-1654776193716.png

 

v-yuta-msft
Community Support
Community Support

Hi pbiuser2,

 

Because you are using import mode so all of the data have been loaded in your data model, you only need to save the PBIX file.

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Does that mean that, if the original is deleted, then the data will remain in PBI? I want to remove the errors in the Query Editor once this happens. Is it possible to stop it from showing an error?

Hi pbiuser2,

 

Which error are you encountering with? Could you please give some screenshots about your error?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

@v-yuta-msft,

 

It is just the error in the Query Editor that says it can't locate the file. I was just wondering if there is a way to forcibly load the data into the data model and disassociate it form any source so no errors show.Error in BI.png

 

Hi pbiuser2,

 

According to the screenshot you posted, you are connecting the a folder which contains some files, this error occurs after the foler has been removed or name changed, right?

 

Please click Advanced Editor to modify your folder path\folder name like this:

1.PNG 

 

Regards,

Jimmy Tao

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.