Forum Discussion

GuneetB's avatar
GuneetB
Frequent Visitor
1 year ago
Solved

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

  • GuneetB's avatar
    GuneetB
    1 year ago

    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.

5 Replies

  • 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.

  • Anonymous's avatar
    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.

     

    • GuneetB's avatar
      GuneetB
      Frequent Visitor

      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.

  • Anonymous's avatar
    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.