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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
gabriel-mendes
Regular Visitor

Pass Parameter via URL for Data Filtering in Power Query

Hi Community

 

I use PowerQuery to filter the datasource directly on that level for my visuals.

This works great, but I would like to pass this parameter (string) in the URL.

 

The parameter I have created is called "CostCenter".

Then I use "CostCenter" in the table to already filter only the rows that I require.

It filters all the data in the report, which is great.

I use Power-BI Embedded and the Direct Query Mode.

 

Can you help me to pass this value in the URL?

 

Many thanks!

 

SCR-20240907-ktcc.png

 

SCR-20240907-kvhn.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @gabriel-mendes ,

From my knowledge, I am afraid that your requirement is unattainable. According to the screenshot you provided, your parameter was created in Power Query, and in general, a parameter in Power Query can only work in Power Query, it can't even be passed to Power BI Desktop, much less to Power BI Embedded.

You mentioned that your connection mode is Direct Query, and that connection mode does have a way to pass the parameters you create in Power Query for use in Power BI Desktop, but that method has numerous limitations. I'm not sure how your parameter was created, so I'm not sure if it works.
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
If this method works, you can try to publish the parameter in your report as mentioned in the documentation, and then embed the report, but the final embedding result should not be what you want, because this method requires you to go back to Power BI Service and modify the parameter manually before you can display the data corresponding to the other parameter.

Currently the only parameters that can be applied in the report URL should be those mentioned in the documentation like the one below. Can you check if this is an alternative?
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn

Best Regards,
Dino Tao
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

2 REPLIES 2
Anonymous
Not applicable

Hi @gabriel-mendes ,

From my knowledge, I am afraid that your requirement is unattainable. According to the screenshot you provided, your parameter was created in Power Query, and in general, a parameter in Power Query can only work in Power Query, it can't even be passed to Power BI Desktop, much less to Power BI Embedded.

You mentioned that your connection mode is Direct Query, and that connection mode does have a way to pass the parameters you create in Power Query for use in Power BI Desktop, but that method has numerous limitations. I'm not sure how your parameter was created, so I'm not sure if it works.
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
If this method works, you can try to publish the parameter in your report as mentioned in the documentation, and then embed the report, but the final embedding result should not be what you want, because this method requires you to go back to Power BI Service and modify the parameter manually before you can display the data corresponding to the other parameter.

Currently the only parameters that can be applied in the report URL should be those mentioned in the documentation like the one below. Can you check if this is an alternative?
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn

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

PwerQueryKees
Super User
Super User

We need more information, like:

  • What database do you connect to?
  • What is Powerquery M Code you use to connect to your database?
  • What does the url currently look like? 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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