Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
My data source is a SharePoint online library, and I am trying to figure out how to exclude deleted SharePoint files from the result set? Here is an example source step:
= SharePoint.Files("https://examplecompany.sharepoint.com/sites/examplesite/", [ApiVersion = 15])
In other posts, the recommendation is to delete it from the SharePoint recycle bin (both first and second stage). I deleted it from the first stage recycle bin, but I am not a site collection administrator to delete it from the second stage. Plus, I do not think the library owners will remember to do this anyway (why should they?). I am surprised a delete indicator is not included in the metadata.
On a weird note, it looks like Power Query is excluding it from the preview, but the deleted file reappears once it is applied to the report.
Has anyone found a way to achieve this?
Solved! Go to Solution.
It looks like this might have been a timing issue. I refreshed the report while I was on the phone with MSFT (first time since yesterday), and the deleted file was gone. I am not able to see the site collection (second stage) recycle bin, so I cannot see if it has also been purged from the site, too. My understanding contents are automatically removed after 93 days unless someone manually removes them. MSFT did not have any other insight, but I'll consider this resolved for now.
If anyone has any other scenarios, let me know. I am curious if other folks have issues with this.
Interesting observation. The same happens for SharePoint.Contents() . Value.Metadata also doesn't seem to yield anything. You can raise an issue at https://issues.powerbi.com . If you have a Pro license you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/
Thanks for confirming the behavior, lbendlin! I submitted a Pro ticket and will update this post if MSFT is able to provide any insight.
It looks like this might have been a timing issue. I refreshed the report while I was on the phone with MSFT (first time since yesterday), and the deleted file was gone. I am not able to see the site collection (second stage) recycle bin, so I cannot see if it has also been purged from the site, too. My understanding contents are automatically removed after 93 days unless someone manually removes them. MSFT did not have any other insight, but I'll consider this resolved for now.
If anyone has any other scenarios, let me know. I am curious if other folks have issues with this.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |