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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ashukla2
Regular Visitor

Best way to modify parameters for advanced editor

I have a SQL database that I generate new queries for through the Advanced Editor. To get some customability in the query, I created a couple parameters and reference those in the advanced editor. However, to change the value of the parameter I have to open Transform Data and change them in there. How can I set up my dashboard so the user can change the parameter directly from the dashboard and not open transform data (and the resulting SQL query would be updated as well)? Thanks!

1 ACCEPTED SOLUTION

Hi @ashukla2 ,

 

If you want to bind a parameter, you need to under DirectQuery mode:

vjianbolimsft_0-1690422681457.png

Besides, you should check if your query use your parameter correctly.

Here is my example:

vjianbolimsft_1-1690422902052.png

vjianbolimsft_2-1690422935156.png

When I change the parameter in power query, the data of TESTTABLE will change accordingly:

vjianbolimsft_3-1690423057566.png

vjianbolimsft_4-1690423140245.png

 

Best Regards,

Jianbo Li

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

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @ashukla2 ,

 

To allow users to change parameters directly from the Power BI dashboard, you can use slicers. Slicers allow users to filter data in visuals based on their selections. You can bind your parameter to a table field and use a slicer to control it.

Here is a document about this:

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn

Note: To work through these procedures, you must have a valid M query that uses one or more DirectQuery tables.

 

Best Regards,

Jianbo Li

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

I followed the steps, however I after I bind a parameter to a set of values and make a slicer for it. When I change the value of the slicer, the parameter is not changing. I've read that the query needs to be a DirectQuery, but regardless of that shouldn't the actual parameter that I bound to change as well when I preview it under 'Transform Data'? The parameter stays as the default value I set it to.

Hi @ashukla2 ,

 

If you want to bind a parameter, you need to under DirectQuery mode:

vjianbolimsft_0-1690422681457.png

Besides, you should check if your query use your parameter correctly.

Here is my example:

vjianbolimsft_1-1690422902052.png

vjianbolimsft_2-1690422935156.png

When I change the parameter in power query, the data of TESTTABLE will change accordingly:

vjianbolimsft_3-1690423057566.png

vjianbolimsft_4-1690423140245.png

 

Best Regards,

Jianbo Li

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

 

 

 

 

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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