Forum Discussion
Dynamic data source
- Anonymous4 years ago
Sorry Anonymous, but I not sure the Power BI will let you this because of the way the Credential are effectively stored.
Rather than storing a single credential for https://xxxxxxxxxxx.sharepoint.com/ the service will be trying to create one for each https://xxxxxxxxxxx.sharepoint.com/sites/xxxxx-"&Company. The service may not allow the company to change because it leads to the credential change or the need for new credentials. New Credentials will require you into the dataset settings to update.
The Web.Contents relative path feature is really for API calls. It allows the main part of the web address to be stored for credential purposes while allowing the whole web address to change. I think in your case https://xxxxxxxxxxx.sharepoint.com/sites/xxxxx-"&Company is part of the main address.Do you really need it to be Dynamic or are you merely trying to create a PBI Template that asks for the new Site.
Sorry Anonymous, but I not sure the Power BI will let you this because of the way the Credential are effectively stored.
Rather than storing a single credential for https://xxxxxxxxxxx.sharepoint.com/ the service will be trying to create one for each https://xxxxxxxxxxx.sharepoint.com/sites/xxxxx-"&Company. The service may not allow the company to change because it leads to the credential change or the need for new credentials. New Credentials will require you into the dataset settings to update.
The Web.Contents relative path feature is really for API calls. It allows the main part of the web address to be stored for credential purposes while allowing the whole web address to change. I think in your case https://xxxxxxxxxxx.sharepoint.com/sites/xxxxx-"&Company is part of the main address.
Do you really need it to be Dynamic or are you merely trying to create a PBI Template that asks for the new Site.
- Anonymous4 years agoNot applicable
I see what you mean, thanx for the explanation!
The dynamic part is to get all files at once rather than adding the files one by one and the creation of a lot of transform files.- Anonymous4 years agoNot applicable
Thanks Anonymous - note if you want to get a list of all the files. Can I suggest using the SharePoint.Contents or SharePoint.Files power query functions. But I recommend using the Implemention version 2.0. It is faster and more stable than the older api.
SharePoint.Contents( #"SharePoint Site", [Implementation="2.0"] )
SharePoint.Tables( #"SharePoint Site", [Implementation="2.0"] )
SharePoint.Files( #"SharePoint Site", [Implementation="2.0"] )After this point, you can use the standard table filters in Power Query rather than messing around with URL strings.
- Anonymous4 years agoNot applicable
List of all files is not possible, to my knowledge, because the files are in different PRIVATE teams channels, ie files are in separate SharePoint subsites. That is why I tried to make the dynamic URL data source funtion.