Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I want to import files from a sharepoint site. I am connecting to the site, all well, and I'm presented with a huge list of files.
I know that the files that I want to import are the ones in the <target_directory> folder.
I can filter the desired files using a filter in the folder path column but how do I direct PowerBi to only import the selected files. Or the other way round, delete the non selected files.
thank you
BR
Chronis
Hi @Anonymous ,
Which connector do you use when you get data from SharePoint Folder in Power BI Desktop.
By my tests, you could get data via SharePoint folder connector in Power BI Desktop and then you could combine or edit the files like below.
Youalso could delete the files you don't need in query editor like this.
Best Regards,
Cherry
Hi @v-piga-msft
I can get the contents of the SharePoint folder in powerQuery, that 's no problem.
I then filter for files whose "source" column (practically the path of the file) does not contain the folder I want to keep. Basically this presents me a list of all files that I want to delete.
The next step is tricky. With a few hundred files filtered, I do a "REMOVE 5000 top rows" to make sure that all files in the filtered files-list are deleted.
this action though deletes all files, including the ones not filtered i.e. the ones I want to keep. Is it clearer now?
thank you
Chronis
Hi @Anonymous ,
Sorry, I still a little confused about your sceanrio.
If you want to load the specific files in the SharePoint folder when loading, I'm afraid that we cannot achieve that directly currently in Power BI. We need to load all the files in the Sharepoint folder and then filter the files you need.
I'm not understand your step "REMOVE 5000 top rows", could you explain it ?
Best Regards,
Cherry
I have managed to get into power query all the files in the sharepoint directory.
How can I then remove the files I want, but not by selecting one by one, but with a specific criteria.
I can get the list as in your screen shot, but then I can't go selecting files one by one. I use a "contains" filter criteria in the file name.
If I select with the filters the ones I want and then press "Close and Apply" will powerbi import data ONLY from the files I have selected.
if not, how can I delete the files (rows) that are not selected? or, if I select with filters the files I DONT want, how can I delete the selected ones and then remain with the ones that I want.
BR
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
68 | |
43 | |
34 | |
26 |
User | Count |
---|---|
86 | |
50 | |
45 | |
38 | |
38 |