![]() SharePoint root site url has to be hardcoded to avoid hand-authored queries that cannot be refreshed in the Power BI serviceįn = (SharePoint_File_url as text) as binary =>įileUrl_ValidTenant = Text.StartsWith(SharePoint_File_url, BaseUrl),įileUrl_IsSharePoint = Text.Contains(SharePoint_File_url, "./",Comparer.OrdinalIgnoreCase) and Text.StartsWith(SharePoint_File_url, " FileUrl_ValidFormat = FileUrl_IsSharePoint and Text.Contains(SharePoint_File_url, "/Shared%20Documents/",Comparer.OrdinalIgnoreCase),įileUrl_IsValid = FileUrl_ValidTenant and FileUrl_ValidFormat, Let TenantName = "WayneCorp", // update it with your tenant name, usually your company name (your sharepoint url starts with )īaseUrl = " & TenantName & "./", Power BI should only ask it on your first call of the function Get credentials: choose organisational account.Get your file in any query by calling SharePoint_File(YourFileURL) in any query.Find your file url : Click File –> Copy path from Excel application or use "People With Existing Access" on SharePoint online sharing menu.Update TenantName (currently "WayneCorp") in the first row of code with your tenant name (your SharePoint url starts with ).Paste the function code in a new query and call it "SharePoint_File".Requires to " Skip test connection" in Data source credentials to enable refresh in Power BI service.Requires hardcoding your tenant/company name in the function to avoid hand-authored queries issue.Only one authentification and data source setting to manage for all your files (not by SharePoint site).The same function works for all your company SharePoint sites.Get your file with one simple step: SharePoint_File(YourFileURL).Faster than default SharePoint.Files connector.Paste the function in you report, call it with any SharePoint file url.Įt voilà! No more endless waiting at every new editing step, a faster refresh, and only one source settings to manage. A Power Query function that returns the file when providing its SharePoint link. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |