cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
y2gabs
Frequent Visitor

List of Parameters in web source connection string and dynamic filtering to switch parameters

Hi there, maybe a dumb question (or likely a dumb way to ask it) so please forgive me here if so.  I've created a powerbi report that queries yahoo finance table as a web source and am using a list of parameters (stock ticker) in the connection URL.  I'm wondering, is there a way to switch between parameters in the connection string via embed URL filter parameters?  

 

Something like the below embed URL parameter but instead of a filter I use some how change the web source query string parameter?  

URL?filter=Table/Field eq 'value'

 

Thanks!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @y2gabs ,

 

If you are talking about dynamically changing the report dataset by changing the URL parameter in power Bi service, this is not possible.

In desktop, we can get the content of URL by creating a custom function, and get the specified content through parameter input.

(p as number) as table =>
let
    Source = Web.BrowserContents("https://xxxxxxxxx/all/a1_p" &Number.ToText(p)&"/")
    
in
    Source

You can also refer to these blog for details:

https://hatfullofdata.blog/power-query-fetch-web-data/ 

https://blog.crossjoin.co.uk/2016/05/15/creating-m-functions-from-parameterised-queries-in-power-bi/ 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @y2gabs ,

 

If you are talking about dynamically changing the report dataset by changing the URL parameter in power Bi service, this is not possible.

In desktop, we can get the content of URL by creating a custom function, and get the specified content through parameter input.

(p as number) as table =>
let
    Source = Web.BrowserContents("https://xxxxxxxxx/all/a1_p" &Number.ToText(p)&"/")
    
in
    Source

You can also refer to these blog for details:

https://hatfullofdata.blog/power-query-fetch-web-data/ 

https://blog.crossjoin.co.uk/2016/05/15/creating-m-functions-from-parameterised-queries-in-power-bi/ 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.