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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
elaine1217
Helper I
Helper I

Dynamic Data Source - Excel Spreadsheet

Hello, I have had issues with dynamic data sources before, but the resolution I used last time isn't working for me this time around. 

 

I have a dashboard that uses a couple of Excel spreadsheets that are updated by many users; the location and file name changes fairly often, new versions are created, etc. This was becoming a real hassle as everytime a file name or location changed, the dashboard would fail refresh. To avoid this, I created a spreadsheet that users update that lists the filepath and file name for the most current version of each Excel. Then, in PowerBI I have queries that import each line of the Excel. 

 

This works fine in Desktop, but it is a dynamic data source and service won't allow refreshes, which is really necessary for this dashboard. I wanted to see if either a) anyone could help updating this query to make the source not dynamic or b) if anyone has a better solution they have found for when files change name/location often. 

 

Filtered Rows2 is the table listing each excel file's name, it's file path, file name, etc. For each query, i filter to a specific row then try to get the contents of the first row. The "Contents" step is what is causing the 'dynamic data source' error message. 

 

#"Filtered Rows2" = Table.SelectRows(#"Filtered Rows1", each ([Resource] = "Filter Value")),
Contents = Web.Contents(#"Filtered Rows2"{0}[FullPath])

 

Thanks for any insight or assistance!

3 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

 To avoid this, I created a spreadsheet that users update that lists the filepath and file name for the most current version of each Excel.

That invites user errors.  Instead, have them place the "latest"  files in a specific sharepoint folder. Then in your Power BI you connect to that folder (static connection) and grab whatever files are in the folder.  That way you can refresh in the service _and_ don't need a gateway.

View solution in original post

SaiTejaTalasila
Super User
Super User

Hi @elaine1217 ,

 

Incase if they are uploading all files to the same SharePoint then you can ask them to create the file name in specific format .It helps you to filter the files easily.example-<file name etc,..>_elaine.xlsx.

In transform data you can apply contains Elaine and filter file names and use split column name and you can further filter it based on requirement.

 

 

Thanks,

Sai Teja 

View solution in original post

v-tangjie-msft
Community Support
Community Support

Hi @elaine1217 ,

 

Thanks to @SaiTejaTalasila  and @lbendlin  for the quick reply and solution. Please allow me to offer other insights:

 

Please refer to the following documents to use RelativePath with Web.Contents():

Solved: Dynamic data sources aren't refreshed in the Power... - Microsoft Fabric Community

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query 

https://tengkuma.vercel.app/blog/posts/conquering-urls-with-relativepath-and-query-in-power-bi

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @elaine1217 ,

 

Thanks to @SaiTejaTalasila  and @lbendlin  for the quick reply and solution. Please allow me to offer other insights:

 

Please refer to the following documents to use RelativePath with Web.Contents():

Solved: Dynamic data sources aren't refreshed in the Power... - Microsoft Fabric Community

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query 

https://tengkuma.vercel.app/blog/posts/conquering-urls-with-relativepath-and-query-in-power-bi

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

SaiTejaTalasila
Super User
Super User

Hi @elaine1217 ,

 

Incase if they are uploading all files to the same SharePoint then you can ask them to create the file name in specific format .It helps you to filter the files easily.example-<file name etc,..>_elaine.xlsx.

In transform data you can apply contains Elaine and filter file names and use split column name and you can further filter it based on requirement.

 

 

Thanks,

Sai Teja 

lbendlin
Super User
Super User

 To avoid this, I created a spreadsheet that users update that lists the filepath and file name for the most current version of each Excel.

That invites user errors.  Instead, have them place the "latest"  files in a specific sharepoint folder. Then in your Power BI you connect to that folder (static connection) and grab whatever files are in the folder.  That way you can refresh in the service _and_ don't need a gateway.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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