Forum Discussion
How to switch sources within sharepoint folder
- 9 years ago
Just figured it out myself: Goto "Query Editor". On "Manage Parameters" select "New Parameter" and enter a name, a list of values and a current value. Then in "Advanced Editor" simply refer to that parameter, e.g.
File = Source{[Name=MyFileParameter,#"Folder Path"=MyPathParameter]}[Content]
Hello!
I have same issue and I am not exactly sure how you define a list of values for a parameter, could you please explain?
Hi,
Actually I wasn't using a list of values for one parameter, but different parameters for site_url, folder_name and file_name. But in the Power Query Editor you can go to 'Manage Paremeters' and under 'Suggested Values' select 'List of values' and then type your list in.
See an example here: https://powerbi.microsoft.com/de-de/blog/deep-dive-into-query-parameters-and-power-bi-templates/
- JoeRobert066 years agoHelper II
if you can provide the m code for this example, that would be awesome.
Thanks for the share!
- JoeRobert066 years agoHelper II
I figured it out, see below screenshot as reference. You can create parameters for each argument shown below in yellow and do not need to place (") or (&) symbols. In my case, all I needed was a parameter to toggle the filepath and left the other arguments alone.