Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Umair_Aslam
Helper I
Helper I

Use parameters in SP Power BI

Hi every one!

 

I want some info about use of parameters in power bi after publish the report "Publish to Portal".

  1. let suppose we make connectivity with sql using sp and load data successfully in Power Bi then move this file to another PC in which sql isn't connect but we still can see that data which were we load initially . By using this data I make visual or report and publish it to app.powerbi.service and embed with "Publish to Portal" and attached with Iframe in a web site. Now my requirement is. I want to use SP with 2 parameter's. How can we use it.
  2. Is it possible? user select two dropdown values in embedded report and get data from SP.

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Umair_Aslam 

 

You may have a look at the following article about using Stored Procedure with parameters in Power BI. 

Execute SQL Server Stored Procedure With User Parameter In Power BI

 

This will use Power Query parameters. When you publish the report to Power BI Service, you are able to change parameter values on its dataset settings page. Next time when you refresh this dataset, it will apply the new parameter values to the query and import data from the database accordingly. If your database is on the local server, you need to set up an on-premises data gateway to help perform the refresh in Power BI Service.

What is an on-premises data gateway? | Microsoft Learn

Tutorial: Refresh data from an on-premises SQL Server database - Power BI | Microsoft Learn

 

For the second question, I'm afraid the answer is no. Currently the closest solution is to use the Dynamic M query parameters in Power BI Desktop. However, this feature only supports DirectQuery mode while Stored Procedures are not supported in DirectQuery mode.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Umair_Aslam 

 

You may have a look at the following article about using Stored Procedure with parameters in Power BI. 

Execute SQL Server Stored Procedure With User Parameter In Power BI

 

This will use Power Query parameters. When you publish the report to Power BI Service, you are able to change parameter values on its dataset settings page. Next time when you refresh this dataset, it will apply the new parameter values to the query and import data from the database accordingly. If your database is on the local server, you need to set up an on-premises data gateway to help perform the refresh in Power BI Service.

What is an on-premises data gateway? | Microsoft Learn

Tutorial: Refresh data from an on-premises SQL Server database - Power BI | Microsoft Learn

 

For the second question, I'm afraid the answer is no. Currently the closest solution is to use the Dynamic M query parameters in Power BI Desktop. However, this feature only supports DirectQuery mode while Stored Procedures are not supported in DirectQuery mode.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @v-jingzhang thanks for your response. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors