Forum Discussion

Lars-6's avatar
Lars-6
Regular Visitor
1 year ago
Solved

Making changes in URL with filter

Hi,    I am working from a company, and recently they wanted to begin with Power BI. I was asked to do this. I am completely new to power BI, but managed to figure most things out. only for one thi...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Lars-6,

    Thanks for reaching out to the Microsoft fabric community forum.

    Based on what you've described, it looks like you're using a web API that returns data for a single invoice ID at a time, and you're hoping to let report viewers enter or select an invoice ID from a slicer, which would then update the URL and pull in the relevant data dynamically. This is a common question, and I want to clarify how Power BI works in this area.

    In Power BI, slicers and filters only work on data that’s already loaded into the report. They can’t be used to change the query or URL that’s used to fetch the data in the first place. Since you're using a URL like "https://company/get/v6/invoices/2025001", the 2025001 part is hardcoded when Power BI runs the query, and it doesn’t respond to changes from a slicer.

    That’s why even though you can create a parameter and use it in the URL in Power Query using the Advanced Editor or GUI, it won’t dynamically change based on slicer input during report viewing.

    To make this work as expected, here are two possible appoaches which you can follow:

    * You can manually define a parameter in Power Query for the invoice ID and use that in your URL. Each time you

       want to change the invoice, you’d update the parameter and refresh the data. This can be useful during

       development or if only a few people are using the report.

    * If your API ever supports querying a list of invoices (e.g. by date range or customer), that would be ideal. You

       could pull all needed invoice data into Power BI once, and then use slicers/filters as you intended because the

       data would already be there.

    Right now this is the only way possible and it’s not the perfect solution, but Power BI doesn’t currently support dynamic API calls based on user input during report interaction.

     

    I would also take a moment to thank vanessafvg, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

     

    If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

    Best Regards,
    Hammad.
    Community Support Team

     

    If this post helps then please mark it as a solution, so that other members find it more quickly.

    Thank you.