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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors