Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Is it possible to manipualte, or change the query parameter value using buttons, slicer, and DAX?
Hi @akaichi As I can understand that you want to change power query parameter value dynamically using slicer or buttons.
If this is the case, then you can change power query parameter value dynamically using slicer for direct query only. For import mode this is not possible.
To acheive this, follow below steps:
1. Connectivity mode should be Direct query.
2. Create new parameter. For my case it is a country name list with a default value.
3. Go to the table you want to filter. For my case Country name. I have used adventure works database. Open advance editor and add a filter step with parameter name. So, [EnglishCountryName] = newly created parameter name.
4. Create a seperate query with the country name only column. Which will be used in the slicer to dynamically change parameter value. My hardcoded current value is "Australia". Through this table, I will change what ever country I want. Also, any other field, such as date or color etc can be used.
5. Close and load.
6. Go to Model View and select the country list table , and select the column name, you have created in step 4.
7. In the table countrylist, select column CountryName, and go to properties -> advance option. Click bind to parameter drop down and select parameter name, and you are done.
8. Create slicer with the countryname column, you have created in step 4. Now when ever you want , you can change the underlying data table based on the slicer selection. Note, slicer will be by default single select.
Remember, my parameter hardcoded value was "Australia", see the image below, it is now United States based on my selection.
Also, keep remember, table which will be used in slicer to dynamically change value, could be direct or import. Mixed connectivity mode can work.
Hope this helps!!
If this solved your problem, please accept it as a solution, and a thumps up!!
Best Regards,
Shahariar Hafiz
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |