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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.