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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

How to set up function to get files without triggering Dynamic Data warning

Hi, I have to gather several files from the same folder in Sharepoint. I developed a function that receives a folder and a file name and returned me bytes, to use with the appropriate connector, like CSV.Document or Parquet.Document, for example. 

 

(folder as text, file as text)=>
let
// splits url path using forward slash, remember to strip /:r:/
// then get first 5 pieces to build sharepoint folder url
sharepoint_path = Text.Combine(List.Range(Text.Split(folder, "/"), 0,5), "/"),
sharepoint_folder = SharePoint.Files(sharepoint_path, [ApiVersion = 15]),

//replace '%20' for space
folder_path = Text.Replace(folder, "%20", " "),
filter_files = Table.SelectRows(sharepoint_folder, each ([Folder Path] = folder_path)),
bytes = Table.SelectRows(filter_files, each (Text.Contains([Name], file)))[Content]{0}
in
bytes

My problem is: 
This functions triggers the Dynamic Data Source warning. And this makes the report unable to schedule a refresh in Power BI service. 


Have anyone bumped in this kind of problem? Have you found any workaround for this?
Best regards 


0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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