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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
v-junyant-msft
Community Support
Community Support

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
v-junyant-msft
Community Support
Community Support

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
Impactful Individual
Impactful Individual

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.