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
TakedaBill
Regular Visitor

Using a SharePoint Folder as a datasource

I have a number of CSV files in a SharePoint folder that I would like to combine and use as a datasource much the same way you can use the Folder connector.  But, when I select SharePoint Folder, it only wants the root URL for the site not including subfolders.  The site contains a ton of other stuff that I dont want to combine and then filter out afterwards.

 

Untitled.png

 

How can I acces the files in a particular subfolder?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @TakedaBill ,

 

When using the Sharepoint folder you need to give the root folder (as you refer) the trick for this is then to select a file for the function that is on the folder you need to make the transformation, and when you go to the query where the implementation of the function is made, right after the first step (where you have all the information of the files/folders) you filter out by file location only the folder you need.

 

So you are not filtering at the first step but is still doable.

 

Believe this is a limitation of the connector.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
SimonAurizon
Advocate I
Advocate I

I had the same issue.

 

In the end, I initially allowed it to load the whole SharePoint subsite and then went into the advanced editor and fixed it up in there:

 

Under the:

Source = SharePoint.Files("https://acme.sharepoint.com/sites/MySubsite", [ApiVersion = 15]),

line, I added an additional line:

 

#"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "https://acme.sharepoint.com/sites/MySubsite/Shared Documents/General/FolderName/")), including the comma at the end.

 

And changed the next line down, that was referencing Source, to reference #"Filtered Rows".

 

And that seemed to work.

MFelix
Super User
Super User

Hi @TakedaBill ,

 

When using the Sharepoint folder you need to give the root folder (as you refer) the trick for this is then to select a file for the function that is on the folder you need to make the transformation, and when you go to the query where the implementation of the function is made, right after the first step (where you have all the information of the files/folders) you filter out by file location only the folder you need.

 

So you are not filtering at the first step but is still doable.

 

Believe this is a limitation of the connector.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.