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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
UsePowerBI
Post Prodigy
Post Prodigy

How to connect a specific Sharepoint folder?

Hello!

 

I am having issues to connect a specific Sharepoint folder to PowerBI. I get a 404 error when I enter the full Sharepoint folder url.

 

Instead, what I can only do, is to enter the Sharepoint root url as a Web Source and then I have to filter through all the files in the Sharepoint site which is not efficient.

 

Is there a workaround for that?

 

Thanks!

1 ACCEPTED SOLUTION
KNP
Super User
Super User

Hi @UsePowerBI,

 

You could go directly to a file with...

Web.Contents("https://yourdomain.sharepoint.com/sites/yoursite/Shared Documents/yourfolderpath/file.extension")

 

Typically what I do is have two parameters setup, a pSite and pFolder.

 

The first query I keep as a staging query to pull back all of the required files to be reused in other queries.

It may seem inefficient but it is not pulling back all of the site files, only the metadata properties.

// pSite
"https://yourdomain.sharepoint.com/sites/yoursite/" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]

// pFolder
"yourfolderpath/" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]

// Query1
let
    Source = SharePoint.Files(pSite, [ApiVersion = 15]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = pSite & pFolder))
in
    #"Filtered Rows"

 

Hope this helps.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @UsePowerBI,

Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
KNP
Super User
Super User

Hi @UsePowerBI,

 

You could go directly to a file with...

Web.Contents("https://yourdomain.sharepoint.com/sites/yoursite/Shared Documents/yourfolderpath/file.extension")

 

Typically what I do is have two parameters setup, a pSite and pFolder.

 

The first query I keep as a staging query to pull back all of the required files to be reused in other queries.

It may seem inefficient but it is not pulling back all of the site files, only the metadata properties.

// pSite
"https://yourdomain.sharepoint.com/sites/yoursite/" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]

// pFolder
"yourfolderpath/" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]

// Query1
let
    Source = SharePoint.Files(pSite, [ApiVersion = 15]),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = pSite & pFolder))
in
    #"Filtered Rows"

 

Hope this helps.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
Fowmy
Super User
Super User

@UsePowerBI 

Hope this video will guide you: https://www.youtube.com/watch?v=KzIjEUXm7Ic


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.