Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
Dear All,
My requiremnt is to send parameter to sql but i need drop down to choose valeu
Table Info : Assume I have tabel(Emp_Info) with columns [EmpName,Location,salary]
Requiremnt : My table have 2 crore rows
I want to give user an option to choose location (Which shoud be dropdown list and it should auto populate from the existng table)
when user select any location this parameter should pass to sql database and should only data related to Selected Location.
Please help me this approach.
My Experiments :step 1 - Created Source 1 with sql table (select * from my Emp_Info)
step 2 - Creted source 2 with sql select distinct Location from emp_info
step 3 - Create new parameter(Location_param) and choose query and (choosen source 2)
step 4 - Opened advanced editor and modified select * from my Emp_Info where location = '"&Location_param&"'
But while applying changes am gettig error Please suggest solution
It turns out that this is actually possible in Power BI. I've created a walkthrough video on how to do this here.
The basic gist is to add an R visual that takes in your slicer selection as its value. There is an R package called RODBC that can run SQL code against your database. You can then pass your slicer value into the SQl query using some string interpolation or the "paste" function. Let me know how this works for you.
Thanks,
Parker
Make sure you use the Import mode and set parameter Type to Text. For DirectQuery mode, use a Slicer instead.
Thank you for your reply. Could you plese explain in detailed , I am planing to load data from sql to powerbi data model with filter but slicers will appear at report level correct so how can i make use of slicers here
Just drag [location] to Field.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
78 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |