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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.