Forum Discussion

cchrystal's avatar
cchrystal
Regular Visitor
4 years ago
Solved

Passing Parameters Dynamically in Power BI Embedded

Hello All,

 

I'm working on integrating a PBI report into an internal application through Power BI Embedded. As a part of this solution we have incorporated a parameter to filter the dataset down to a unique ID specific to the end user consuming the report through our internal application.

 

Is there a way, through the Query Parameter API, to update the parameter based off a link or existing code in our internal application?

 

IE: Rather than having to input each parameter value in the JSON script having a call to the URL that automatically updates the parameter based off the ID being targetted by the end user?

 

Thanks in advance for any and all assistance

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi cchrystal ,

     

    As far as I know, I think you can try dyncmic M query parameters.

    With Dynamic M Query Parameters, model authors can let report viewers use filters or slicers to set the value(s) for an M Query Parameter, which can be especially useful for query performance optimizations. With Dynamic M Query Parameters, model authors have more control over how filter selections get incorporated into DirectQuery source queries.

    For referenece:

    Dynamic M query parameters in Power BI Desktop

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi cchrystal ,

     

    As far as I know, I think you can try dyncmic M query parameters.

    With Dynamic M Query Parameters, model authors can let report viewers use filters or slicers to set the value(s) for an M Query Parameter, which can be especially useful for query performance optimizations. With Dynamic M Query Parameters, model authors have more control over how filter selections get incorporated into DirectQuery source queries.

    For referenece:

    Dynamic M query parameters in Power BI Desktop

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • StephenL_CA's avatar
    StephenL_CA
    Frequent Visitor

    Hi, I have a similar problem to resolve. I have a dataset that is the result of a stored procedure accepting an input parameter value.

    First, I have no issue to embed the report using JavaScript. But my web application, depending on the case, passes in a different parameter value. I am hoping to pass this value to the sp to each time get a different set of data (the schema is the same). I read the Dynamic M query parameters in Power BI Desktop article. But I am confused, in Power BI Desktop, I could not find the "Bind to parameters" in Model View when following the steps to set up my list table.

    What do I do wrong? I have Power BI Desktop Version: 2.118.828.0 which should be the latest.

    Thank you in advance for your help.