Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
Expand all | Collapse all

Pass parameters dynamically from Power BI to Stored Procedure

  • 1.  Pass parameters dynamically from Power BI to Stored Procedure

    Silver Contributor
    Posted Jun 06, 2018 04:55 PM
    Hi,

    I have a stored proc that takes a hotel name as a parameter to retrieve a whole set of measures required by my dashboard.
    I want to be able to allow the users to select a specific hotel from a drop down/slicer and pass that hotel name to my stored proc and refresh the dashboard for the selection made.
    I cannot load all the data first and then allow user to select the hotel name since the fact tables are extremely huge and would impact performance. Is there any way to dynamically pass the values to the Stored procedure as a parameter(at run time)?

    Any iseas would assist.

    Thanks


  • 2.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Posted Jun 07, 2018 03:25 AM
    ​declare Parameter1
    exec StoredProcedure Parameter1

    ------------------------------
    Dražen Đurinić
    CEO
    DOMINO GRUPA d.o.o.
    Zagreb
    +38516182500
    ------------------------------



  • 3.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Silver Contributor
    Posted Jun 07, 2018 10:30 AM
    I am already doing this. I want the selection from the slicer to be passed as a parameterSP during runtime.
    So the SP should be executed dynamically


  • 4.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Bronze Contributor
    Posted Jun 07, 2018 03:49 PM
    I think what you are looking for is writeback functionality. Unfortunately unsupported by Power BI currently despite a lot of use cases. What you may require is a PowerApps app that you can embed in Power BI. That is one of the only ways I have seen someone take information from the current report's evaluation context and use it to change data in a source system.

    ------------------------------
    Anthony
    ------------------------------



  • 5.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Silver Contributor
    Posted Jun 07, 2018 04:31 PM
    @Anthony Yanan​ Thanks for your recommendation. I hope Pwer BI gets this functionality very soon, this seems to be such an important requirement, I am surprised it is not yet available


  • 6.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Bronze Contributor
    Posted Jun 08, 2018 02:56 AM
    The nearest I've seen to this is by using a PBI template and sharing that using PBI desktop. It wouldn't allow you to switch parameters in the report though, you'd have to reload the template each time, and you wouldn't be able to share the report via the PBI service

    ------------------------------
    Johnny Winter
    Business Intelligence Developer
    ------------------------------



  • 7.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Bronze Contributor
    Posted Aug 25, 2018 03:29 PM
    Hi Shilpa,

    I am also looking for same functionality,If you resolved or find any solutions​,Please let me know .


    ------------------------------
    srini N
    Power Bi Developer
    4252299069
    ------------------------------



  • 8.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Posted Mar 14, 2019 05:18 AM
    Hi, Sirini,
    I am also  facing the same issue. If you found any solution, kindly share.

    ------------------------------
    Sana Abdul
    Developer
    30040033300
    ------------------------------



  • 9.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Silver Contributor
    Posted Jun 08, 2018 04:12 AM
    @Rose Spitzer is there anyway you can run a 'Community Best Question/Answer of the Month" and reach out to community members to share their knowledge and potential answers, as this question merits a community effort to get a credible answer.
    Thanks David

    ------------------------------
    David Moss
    Advanced Analytics & Power BI Azure Solutions
    Wottabyte
    London
    ------------------------------



  • 10.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Posted Jun 08, 2018 08:57 AM
    Hi @David Moss. Yes, I can try to bring some attention to this question. Do you know if the feature mentioned above is already listed on the ideas forum? This is a good way to get the issue in front of the Power BI Development team: ​

    ------------------------------
    Rose Spitzer
    PUG General Manager
    rose.spitzer@pbiusergroup.com
    ------------------------------



  • 11.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Silver Contributor
    Posted Jun 08, 2018 03:45 PM
    @Rose Spitzer I do see some ideas for this issue:

    Parameters
    Microsoft Power BI remove preview
    Parameters
    Execute stored procedure parameters
    View this on Microsoft Power BI >


    Passing Parameters to Power BI through Stored Procedure
    Microsoft Power BI remove preview
    Passing Parameters to Power BI through Stored Procedure
    There Should be Provision of passing the Parameter to the report like we do in SSRS Reports. There should be any method to execute Stored Procedure by passing the Parameters
    View this on Microsoft Power BI >
    https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/20367082-passing-parameters-to-power-bi-through-stored-proc​​




  • 12.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Posted Jun 08, 2018 04:42 AM
    ​Hi Shilpa,

    You may have seen these before, the below Guy in a Cube video's might give you some ideas. They're not exactly the use case you have described, but they are close and might help !.

    Failing that, as already mentioned, PowerApps might be the best solution

    Parameters and Templates with Power BI Desktop
    YouTube remove preview
    Parameters and Templates with Power BI Desktop
    In this video, Patrick shows a way you can use parameters and templates, with Power BI Desktop, to provide prompts for your connection's server and database properties. This is great for when you are creating a report, and need to share it with a customer that may have a different name for the server and database name, but the database schema is the same.
    View this on YouTube >



    Dynamic Power BI reports using Parameters
    YouTube remove preview
    Dynamic Power BI reports using Parameters
    In this video, Patrick shows you how you can use a parameter, within a Power BI report, to dynamically change the data in a report. This uses M Functions within Power Query and a second source that has the key values to pull. Then using a gateway to enable refresh.
    View this on YouTube >



    Dynamic filtering with Power BI
    YouTube remove preview
    Dynamic filtering with Power BI
    In this video, Patrick looks at taking URL filtering to the next level. He shows how to use dynamic filtering with Power BI reports. He also shows a neat trick of setting a link image for Web URL fields. Filtering in Power BI: https://powerbi.microsoft.com/en-us/blog/filter-a-report-with-a-url-query-string-parameter/ https://powerbi.microsoft.com/en-us/documentation/powerbi-service-url-filters/ LET'S CONNECT!
    View this on YouTube >


    ------------------------------
    Gavin Clark
    Process Manager Data Visualisation
    Pramerica
    Letterkenny
    749197911
    ------------------------------



  • 13.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Silver Contributor
    Posted Jun 08, 2018 03:38 PM
    @Gavin Clark​ Thanks much, I have seen these videos. They won't work in our scenario. We are embedding Power BI on our application and we want to avoid our end users having to enter parameters, so we are looking for a slicer option.
    For now, we will probably just avoid the Stored procedure execution from dashboard. We will pre-load the dashboard data on an aggregate table and schedule the Power BI data refresh multiple times a day. So we can use slicers on the dashboard. But I think allowing for dynamic parameters via slicer would be an ultimate solution so that we will not have to build aggregates for each dashboard. This is such a powerful tool.


  • 14.  RE: Pass parameters dynamically from Power BI to Stored Procedure

    Posted Jul 02, 2018 05:17 AM