Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, Need help to know if its possible or is there any work around.
I have a slicer which contains around 50 values for City Name. I have sourced the stored proecudre for the dashboard. is it possible if a one selected slicer value wuld be passed to stored procedure? I serached a log on many forums but there is no way to do this but is there any work around or trick to do so.
Please advise, thanks!
Solved! Go to Solution.
Hi @harshadsp,
It is not possible to pass a selected value from slicer to stored procedure.
If you want to pass values to stored procedure parameters, you can consider using Power Query parameter. Here are some links for your reference:
Power Query and Stored Procedures with parameters
Best regards,
Yuliana Gu
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
Hi @harshadsp,
It is not possible to pass a selected value from slicer to stored procedure.
If you want to pass values to stored procedure parameters, you can consider using Power Query parameter. Here are some links for your reference:
Power Query and Stored Procedures with parameters
Best regards,
Yuliana Gu
Hi @harshadsp,
If above links are helpful to your scenario, appreciate that you could mark it as an answer so that others having similar requirement can find the solution more easily. If you still have any question, please feel free to ask.
Regards,
Yuliana Gu
Hi @v-yulgu-msft,
Sorry for delayed response. Yes, the above links are really helpful and it did workaround upto certain extent but it would be help full if power bi could pass parameter directly from visuals to stored procedures 🙂 I hope this will be added in near future.
I appreaciate your help in this matter!
Thanks
Harshad
Hello All,
I am new to Power BI and have just joined the community.
I had a requirement of passing the slicer values to a stored procedure and came across this blog. Is this feature now available and if yes in which version?
Has anybody tried passing values from slicer to a stored proceudre?
I need to pass 2 date values to my stored proc from the date slicer.
Thanks for your help.
Regards
Sophia
Hi @scorreia,
As per my knowledge its still not possible yet but you may get some help from following link
https://community.powerbi.com/t5/Integrations-with-Files-and/parameters-to-SP-or-Sql-query/m-p/58337
Thanks
Harshad
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
@AnonymousThis is really awesome! You have saved my lot of work and probably my job as well 🙂 he he he. I am subsribing you course on udemy. Really great video. Your time & efforts are highly appreciated!!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |