Forum Discussion
Passing a slicer value to a query parameter
Hi,
I need to pass a slicer value to a query parameter.
I created a query parameter named (LanguageParam) and filter my table name (Data) using this parameter. I created a slicer name (Selectlangauge) that takes a single value (“en” for English, “fr” for French) and I want to pass the selected slicer value to the query parameter (LanguageParam).
I tried using the Bind Parameter feature but it is missing from the Model View. Is there any alternative solution?
Thanks,
Abdul
6 Replies
- AnonymousNot applicable
Hi, afkhalifeh
You can follow the official tutorial below to create a query query and bind them in a visual:
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
If you need to read items selected by the slicer, you can use the SeletedValue or SeletedColumn functions. For more information, please click on the following links to learn:
Slicers in Power BI - Power BI | Microsoft Learn
SELECTEDVALUE function - DAX | Microsoft Learn
SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- afkhalifehFrequent Visitor
Hi,
Thank you for your kind reply.
You can download the .pbix file from this link https://drive.google.com/file/d/1b2GoKtc6XzDr7oqvauACMX_idXCDkyf_/view?usp=drive_link
As you see, I need to filter the data based on the selected language but the filter didn't work fine.
- AnonymousNot applicable
Hi, afkhalifeh
I can't open the link you shared. Please set it as a shared link.
Best Regards
Jianpeng Li