Forum Discussion

ShNBl84's avatar
ShNBl84
Icon for Advocate II rankAdvocate II
6 years ago
Solved

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 SharePoi...
  • ShNBl84's avatar
    6 years ago

    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.