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

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.

Reply
ShNBl84
Helper II
Helper II

How to connect to a SharePoint folder

I want to connect to a folder on my company SharePoint and use it in PBI.

 

Using Get Data and then SharePoint folder, I can connect through my C drive and it all works, but it needs to be SharePoint based, not just on my computer.

The SharePoint folder link is: https://XXXXXXX.sharepoint.com/:f:/r/dataanalytics/Shared%20Documents/Administration/Pricing%20Compl...

 

Using the above link that SharePoint provides, I get an error:

 

I can get connected with the root site (https://XXXXXXXXXX.sharepoint.com/) and one folder deep (https://XXXXXXXXXX.sharepoint.com/dataanalytics/).

2020-02-03 15_53_29-Advanced Editor.png

But I get an error when I try any of the below:

'https://XXXXXXXXXX.sharepoint.com/dataanalytics/Procurement/'

'https://XXXXXXXXXX.sharepoint.com/dataanalytics/Shared Documents/'

'https://XXXXXXXXXX.sharepoint.com/dataanalytics/Shared%20Documents/'

2020-02-03 15_49_10-MA pilot (Apple) - Power Query Editor.png

Has anyone been able to connect to a SharePoint folder?

1 ACCEPTED SOLUTION
ShNBl84
Helper II
Helper II

Not a great solution, but I came up with one.

 

First, I connected to the folder I needed by using Get Data and selecting Folder and browsed to the SharePoint folder on my C drive. I then selected "Combine & Transform Data" to prompt PBI to make all the helper queries that combine all the csv files I have in that folder.

Then, I made another connection and went as deep as PBI would allow me connecting to the SharePoint folder via Get Data > SharePoint Folder (https://XXXXXXXXX.sharepoint.com/dataanalytics/). I then filtered the "Folder Path" column to select only the final folder destination that I need. 

I opened the Advanced Editor in the C drive data and copied all the code except the Source line. I pasted that code below the second code line (first was Source, second was filtering to the folder I need) in the second connection (the SharePoint folder one) and made the appropriate name/source adjustments to get the code to fit.

So I now have a solution that connects to my SharePoint that gets only the folder I need, but I imagine a lot of unneeded processing is being done while PBI pulls my company's entire dataanalytics folder, then filters to just the folder I need thereafter. I am really surprised that there does not seem to be a more efficient and user-friendly way of doing it. I would love to hear if anyone has a better solution.

View solution in original post

4 REPLIES 4
ShNBl84
Helper II
Helper II

Not a great solution, but I came up with one.

 

First, I connected to the folder I needed by using Get Data and selecting Folder and browsed to the SharePoint folder on my C drive. I then selected "Combine & Transform Data" to prompt PBI to make all the helper queries that combine all the csv files I have in that folder.

Then, I made another connection and went as deep as PBI would allow me connecting to the SharePoint folder via Get Data > SharePoint Folder (https://XXXXXXXXX.sharepoint.com/dataanalytics/). I then filtered the "Folder Path" column to select only the final folder destination that I need. 

I opened the Advanced Editor in the C drive data and copied all the code except the Source line. I pasted that code below the second code line (first was Source, second was filtering to the folder I need) in the second connection (the SharePoint folder one) and made the appropriate name/source adjustments to get the code to fit.

So I now have a solution that connects to my SharePoint that gets only the folder I need, but I imagine a lot of unneeded processing is being done while PBI pulls my company's entire dataanalytics folder, then filters to just the folder I need thereafter. I am really surprised that there does not seem to be a more efficient and user-friendly way of doing it. I would love to hear if anyone has a better solution.

Anonymous
Not applicable

Here is great blog from Mitchell Pearson.

 

https://mitchellpearson.com/2018/06/04/quick-tips-connecting-to-a-sharepoint-folder-in-power-bi/

 

 

Regards,

 

Ferdinand

Anonymous
Not applicable

  • See how "deeply" it lets you connect into the SharePoint.
  • Use Text Filters - Contains to filter down to the file name you need.
  • Click on only that one.
Tad17
Solution Sage
Solution Sage

Hey @ShNBl84 

 

Check out this thread where your question was answered: https://community.powerbi.com/t5/Desktop/Sharepoint-Folder/td-p/237546

 

Copied Answer:

 

"Based on my test, we have to list all available folders, then select those we need from the list. As mentioned in above link:

 

Now that we’re in, we’ll be able to see all of the files from all of the folders that we have access to in that specific site. This might be a pretty long list, so let’s do some filtering on the “Folder Path” column and select the folder where your data is being stored so you only get the files from it."

 

You may also want to check out this article: https://powerbi.microsoft.com/en-us/blog/combining-excel-files-hosted-on-a-sharepoint-folder/

 

If this helps please kudo.

If it answers your question please accept it as a solution.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.