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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GuneetB
Frequent Visitor

Dynamic Query

Hi,

I have 2 tables which are fetching data through APIs connected by Web data source.

I have created a parameter in order to change the API URL so that i can change the Space i am using.

 

I now want this parameter to be edited outside query editor in the canvas but since web data source cant be direct query i dont have the option for Bind to parameter.

 

Kindly advise

1 ACCEPTED SOLUTION

Hi,

Thanks for your help but i took a different route.

 

I iterated IDs from table 1 on table 2 in order to form a singular table for all the Spaces combined and now using a slicer to filter.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @GuneetB 

It's great to hear that your issue has been resolved. Please accept the reply as the solution. This will help other community members solve similar problems more quickly.

Thank you.

Anonymous
Not applicable

Hi @GuneetB 
Thank you for reaching out microsoft fabric community forum.

You're right — Web data sources in Power BI only support Import mode, so you can’t link parameters to slicers on the report canvas. A common workaround is to create a table with your space names or IDs using "Enter Data", then add a slicer based on that table. In Power Query, connect to each API URL (one per space), add a column to identify which space the data came from, and append them into one table. This lets users switch between spaces using the slicer, since all the data is already loaded.

Alternatively, if you only want to load data from one space at a time, you can use a parameter in Power Query and manually change its value when needed — this won’t be dynamic through the canvas but avoids editing the full URL.

If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community
Thank you.

 

Hi,

Thanks for your help but i took a different route.

 

I iterated IDs from table 1 on table 2 in order to form a singular table for all the Spaces combined and now using a slicer to filter.

Akash_Varuna
Super User
Super User

@GuneetB Consider using a slicer on the canvas by creating a supporting table with possible API URLs or spaces. Then, in Power Query, use this table to dynamically construct the API URL based on the slicer selection.

Can you please provide an example?

Currently my data source is 

SpaceName = Number.ToText(#"Space ID"),
spaceid = "https://api.xyz.com/api/v2/space/" & SpaceName & "/folder"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.