Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors