Forum Discussion
Get all files from onedrive folder in an efficient way
- 6 years ago
Yes. In the SOURCE line of the query, change SharePoint.Files("http://blahblah") to SharePoint.Contents("http://blahblah")
You will be at the root of the sharepoint site. You'll have to navigate through to the desired folder, but the end result will ignore all other folders when your query runs.
- 6 years ago
Change your source to this:
Source = SharePoint.Contents("https://sharepoint_site_root_name", [ApiVersion = 15]),See if that helps.
I'm not sure why it would take a long time to browse, unless the folder you are accessing has hundreds or thousands of files in that folder. It does have to load the full listing of the folder you ultimately get a file(s) from.
Hi sashaxp
As far as I understand the users refresh data from PBI Desktop?
Depending on the license available, do you want to consider creating a dataflow or separate PBI dataset to update the underlying data every time any file in the Sharepoint folder is updated? This can be done using MS Flow and PBI REST API bridge.
The user dataset/reports can be hooked into this central data. Refreshing from dataflow or another PBI is close to instant (depending on the size of the actual underlying dataset).
Kind regards,
JB
Hi Anonymous;
Thanks for suggestion, but at the moment i am trying to make it simple and also slow processing solved as per @edhans suggestions on using SharePoint.Contents instead of SharePoint.Files api calls.