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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors