This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi. I am connecting to all files in multiple folders accross a single SharePoint site for my Power-BI report using PowerQuery. Part of the code is:
let
Source = SharePoint.Files("https://NAME.sharepoint.com/sites/Resource", [ApiVersion = 15]),
Folder1 = Table.SelectRows(Source, each Text.EndsWith([Folder Path], "Assessment/"))
in
Folder1
The issue is that there are files sitting outside of the folder (in the main SharePoint site) that are not used in the report all together whose name contain the '#' symbol. This causes a blank error to generate which then causes report refresh failure. I have considered a few options:
Plese let me know if there's any way to work-around this error related to filenames having '#' symbol.
I just want to point out here that SharePoint really doesn't like the # symbol in filenames either. It causes all kinds of problems, so you might want to recommend that users not do that if it's part of their standard practice right now.
These things are frequently advised to staff, but people end up forgetting regularly.
You could exclude these based on the name
let
// Connect to SharePoint folder
Source = SharePoint.Files("https://NAME.sharepoint.com/sites/Resource", [ApiVersion = 15]),
// Filter to include only files from the desired folder
Folder1 = Table.SelectRows(Source, each Text.EndsWith([Folder Path], "Assessment/")),
// Exclude files with "#" in the file name
FilteredFiles = Table.SelectRows(Folder1, each not Text.Contains([Name], "#"))
in
FilteredFiles
The files that I need to import don't have any '#' in their names. It is the larger extent of the entire SharePoint site where users keep adding filenames with '#' (or '$' or '%').
So, just the first instance of the query ( Source = SharePoint.Files("https://NAME.sharepoint.com/sites/Resource", [ApiVersion = 15]) ) ends up with an error because of wrong symbols in file names. And these files are not part of my report, but just their existence in the SharePoint site results in error. Currently I manually rename these files each morning and that refreshes the report fine.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |