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.
Hi Everybody
Wanting to know how to configure PowerQuery in PowerBI to delete data from the data model when the file is deleted from the source folder.
Currently I have set up a folder to consume some csv files. However, the source files may need to be replaced by newer csv files. Currently I am noticing that even when i delete files from the folder the data remains in the model.
Would like it to delete data from the model when the source file containing it is deleted. How can I acheive this?
Hi
I have deleted the csv file. I ran refresh in PowerWuery, is that the same as refreshing the model?
Because I have done that and the data still remains even with the file gone.
The only way I was able to get the data to delete was to change the source folder. But I can't do that every time.
If you're doing all of this in PBI Desktop (assuming you're not using any Dataflows or datawarehousing of the CSVs) then you would need to:
1) Delete CSV
2) Go to the Home tab in the report view (not Power Query Editor) and hit Refresh:
If your report has been published to the PBI Service then you would need to:
1) Delete CSV
2) Find the Semantic Model in the workspace and refresh that:
Refreshing in the Power Query Editor just refreshes the previews in PQ, it doesn't refresh the model itself.
Pete
Proud to be a Datanaut!
Hi @HankScorpio ,
The natural process of Power BI data refresh is to wipe all data from the model, reconnect to all sources in their curent state, and import the data as it exists at that time. Therefore, performing a refresh on each component of your data chain in the correct order will give you the results you're looking for.
For example, if you have 3 CSV files in a folder which are fed into a Dataflow for transformation, then imported into a data model, you need to follow the steps in this order:
Delete CSV file > Refresh Dataflow > Refresh data model. If your report is in the PBI Service, you may also need to use the Refresh Visuals button in your Service report, and/or refresh your browser. In very rare cases, you may also need to fully refresh your browser's cache as well.
Pete
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.