Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi guys,
I am currently trying to build a very dynamic report for my end users, and it would require something like this:
I create a page with one-or-more input field (slicer or something like that), and when the user uses/sets these input fields (slicer or etc.) then these parameters gets passed to an SQL stored procedure, and the result is then visualised for the user.
Is it possible in Power BI? If not this, than is there any way to give the enduser more freedom with my reports?
Thanks in advance!
Solved! Go to Solution.
Hi @Astorre72 ,
Yes, create query parameters then go to data source setting>select the parameter you need and put your exec queries in Sql statement to get your SQL stored procedure,see below pics:
Here is a reference about how to use query parameter.
Hi @Astorre72,
Once you have granted access to the end users of your SQL data source,when they are connecting the data source in power bi ,they will gain the freedom to your report.
Below is the reference.
https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-enterprise-manage-sql
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-use-directquery
I think I should specify my question further. This is what I already know and tried out:
I can connect to my SQL data source with import or direct query mode. I can import or direct query SQL tables and views and even stored procedure. But what I would like to do is the following:
I want to write an SQL stored procedure with three argument: beginning date and end date and ID. If this three parameter is given to the stored procedure then it returns two columns of data: timestamp (between beginning date and end date) and data (for example stock settl. price). I can achieve this in SQL, but what I want to do, is give the user the freedom to choose these parameters! So in this case I would put on the report page three slicers: two date slicer (for beginning and end date) and one ID slicer. Once the user sets all three slicer to some value, than in the background the SQL stored procedure gets called and two result columns (date and data) are returned and visualised on the report (for example in a line chart).
Obviously I want to do more complex stuff with this ability... But the main point is that is it possible to pass the slicer parameters to an SQL stored procedured, and than visualise the result in some way in power BI?
Hi @Astorre72 ,
Yes, create query parameters then go to data source setting>select the parameter you need and put your exec queries in Sql statement to get your SQL stored procedure,see below pics:
Here is a reference about how to use query parameter.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
39 | |
37 | |
32 | |
25 | |
24 |
User | Count |
---|---|
37 | |
29 | |
23 | |
21 | |
17 |